js实时把输入小写字母自动变大写

一、需求在文本框中输入字符,要求非字母不得输入实时把输入的字母从小写自动转变成大写二、方案利用正则验证 /^[a-zA-Z]+$/.test(value)用oninput事件达到实时转换直接看代码<!DOCTYPE html><html><head> <
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×