Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> Enter your name: <input type="text" name="fname" id="fname" onblur="myFunction()"> <p>When you leave the input field, a function is triggered which transforms the input text to upper case.</p> <script> function myFunction() { var x = document.getElementById("fname"); x.value = x.value.toUpperCase(); } </script> </body> <!-- Mirrored from www.w3schools.com/tags/tryit.asp?filename=tryhtml5_ev_onblur by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:09:08 GMT --> </html>
Result:
Try it Yourself - © w3schools.com