Events in JavaScriptWe will discuss various events in JavaScript and associated triggers with example. Some practical examples we will develop through demo of these scripts.
| Keyboard Events | Description |
| onKeyPress | While pressing a key the event to trigger |
| onKeyDown | Events to trigger whle a key is down |
| onKeyUp | Events to trigger on release of a key on keyboard |
We can trigger events when we focus on any form component like textbox, radio button , checkbox etc. This can be achieved by shifting crusher to the component or by moving it by using tab , we can click on the component and keep the focus on it.
We can display a message or trigger some script when visitor exit the page or closes the browser tab.
Found anything wrong or wants to improve the code by adding more features? Post your short comment here or use the Forum
|