Web browser recognize some action such as click mouse over and many more these event can be used to perform some special task.
Some of the common JavaScript event are
1. onchange
This event get triggered when any changes in made in HTML element eg text box checkbox or any select box.
<input type=”text” onchange=”alert(this.value)”>
2. onclick
This event get triggered when we click on any HTML element like button a tag or p tag
<button onclick=”alert(‘click)”>Click me</button>
3. onmouseover
This event get triggered when the mouse over an HTML element.
4.onmouseout
This event get triggered when the mouse moves away from an HTML element.
5.onkeydown
This event get triggered when a keyboard key is pressed.
6.onload
This event get triggered when the browser has finished loading the page.
Stay tuned for the PHP Magento, WordPress, JavaScript and Magento2 latest tutorial and updates, Hope you enjoyed reading, if you need the professional Magento Development / PHP we can help you, just Click on the Link and send me your requirements.
Please Like the Post on Facebook or Google+.