Content Menu

Home-What is JavaScript?

1. JavaScript Basics

2. JS Simple Coding

3. JS InterActive Content

4. Images and JS

5. JS Functions

6. JavaScript Events

7. JS Conditional

8. JS Loops

9. Other

JavaScript Keyboard Events

JS keyboard events are those associated with some keyboard activity by user. The most commonly used are :-

These event handler is used to instruct the browser on What action to take when a keyboard key is pressed or released. Generally used with text fields in forms.

As we studied in previos lessons, the events are commonly used in combination with functions.

Onkeydown and OnkeyUp Example

As you will write a letter in the text box below, a message will be displayed "User is currently typing". Then once you release the button, the text character will be converted to upper case.

only numbers allowed.

 

 

http://www.w3schools.com/jsref/event_onkeyup.asp

http://www.javascriptkit.com/jsref/eventkeyboardmouse.shtml