Javascript examples for DOM Event:onkeyup
The onkeyup event occurs when the user releases a key.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Supported HTML tags: | All HTML elements, EXCEPT: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title> |
<!DOCTYPE html> <html> <body> Enter your name: <input type="text" id="fname" onkeyup="myFunction()"> <script> function myFunction() {/*from w ww. ja v a2 s .c om*/ var x = document.getElementById("fname"); x.value = x.value.toUpperCase(); } </script> </body> </html>