Tryit Editor v1.4

<html> <head> <script type="text/javascript"> function convertToUcase() { document.getElementById("fname").value=document.getElementById("fname").value.toUpperCase(); document.getElementById("lname").value=document.getElementById("lname").value.toUpperCase(); } </script> </head> <body> <form name="form1"> First name: <input type="text" id="fname" size="20" /> <br /><br /> Last name: <input type="text" id="lname" size="20" /> <br /><br /> Convert to upper case <input type="checkBox" onclick="if (this.checked) {convertToUcase()}"> </form> </body> </html> | Your Result:
Edit the code above and click to see the result. | W3Schools.com - Try it yourself