Friday, July 27, 2007

A simple javascript function to convert to uppercase

<html>
<head> <script type="text/javascript"> function upperCase(x) { var y=document.getElementById(x).value document.getElementById(x).value=y.toUpperCase() } </script> </head>
<body>
Enter your name: <input type="text" id="fname" onkeyup="upperCase(this.id)">
</body> </html>

No comments:

Post a Comment

Please post your comments here.....