<!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>