<html>
<head>
<base target="main">
</head><body bgcolor="blue"><input type=text style="text-transform :uppercase" id='a1'>
</body></html>

解决方案 »

  1.   

    <input style="text-transform:uppercase">
      

  2.   

    <input onblur="this.value = this.value.toUpperCase()">
      

  3.   

    <input type="text" name="t1" size="20" onKeyUp="this.value=this.value.toUpperCase()">
      

  4.   


    <input onblur="this.value = this.value.toUpperCase();"><br>
    <input style="text-transform:uppercase" onblur="alert(this.value);"><br>两种一起用:
    <input style="text-transform:uppercase" onblur="this.value = this.value.toUpperCase();alert(this.value);">