javascript Club
sertai
Fanpop
New Post
Explore Fanpop
In this post, anda can test yourself on which key anda were pressed. When anda get this event contains all the event information that anda might need to write your own code.

Sometimes anda need to prevent some keyboard key operations like prevent to select all text, copy, paste, etc. At that time anda need to write a JavaScript keyboard event function to handle it as per your need.

link
The following JavaScript code, when a keypress event fires, anda will get all event properties. For example, when anda pressing “1”, anda will get “49” value. It is recommended to write logic on an event.which instead of event.keyCode and event.charCode.