Run
Back to
HTML onkeydown Event Attribute
<!DOCTYPE html> <html> <head> <title>Event Attribute onkeydown</title> </head> <body> <p>Click any button in the form to run the script:</p> <input type="text" onkeydown="keyboardTest()"> <script> function keyboardTest() { alert("EXAMPLE: You see this window because you triggered the script"); } </script> </body> </html>