<html>
<head>
<script type="text/javascript">
function upperCase(x)
{
var y=document.getElementById(x).value
document.getElementById(x).value=y.toUpperCase()
}
</script>
</head>
<body>
输入些:<input type="text"
id="code" onkeyup="upperCase(this.id)">
</body>
</html>