When the content of the text box changes, execute the specified JS code to convert the text box characters to uppercase

From , 3 Years ago, written in JavaScript, viewed 179 times.
URL https://pastebin.vip/view/c03afab5
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. function myFunction()
  6. {
  7. var x=document.getElementById("fname");
  8. x.value=x.value.toUpperCase();
  9. }
  10. </script>
  11. </head>
  12. <body>
  13.  
  14. Enter your name: <input type="text" id="fname" onchange="myFunction()">
  15. <p>When you leave the input field, a function is triggered which transforms the input text to upper case.</p>
  16.  
  17. </body>
  18. </html>
  19.  
  20. //javascript/7957

Reply to "When the content of the text box changes, execute the specified JS code to convert the text box characters to uppercase"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website