input输入字母自动大小写转换

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset =utf-8">
    <title>测试大小写转换</title>
</head>
<body>
  大写:<input type="text"  value=""  onkeyup="this.value=this.value.toUpperCase()"> <br/>
  小写: <input type="text" value=""  onkeyup="this.value=this.value.toLowerCase()">
</body>
</html>
View Code
原文地址:https://www.cnblogs.com/dashuai01/p/4805999.html