The events in JavaScript are the actions in a document that result from user activity. The actions are like clicking on a button or typing typing a character in the form. JavaScript object in a document that receives events of different kinds. To handle the events that are taking place requires an even handler that can handle the execution of the events. Event acts like an added attribute that is entered in object’s HTML. The attribute is consisting of event name, sign like (=), instructions. The following code shows the event handler as:<HTML><BODY><FORM><INPUT TYPE=”button” VALUE=”Hello” onClick=”window.alert (‘HELLO WORLD’)”></FORM></BODY></HTML>
Javascript
Topic: JS Window
Explain with an example the use of event handlers in JavaScript.
Browse random answers:
What is a Window Object?
To put a "close window" link on a page ?
Can you explain about Screen object?
How to get height and width of different browser in Javascript?
What is difference between window.onload and onDocumentReady?
How to determine the state of a checkbox using Javascript?
How to get the contents of an input box using Javascript?
What is other equivalent option of document.getElementById() when you are working with Ajax?
How to toggle display an HTML element?
How to get the Scroll height and Width in JavaScript !!
How can you set position of the page (Top and Left) to 0 using Javascript in one line code?
Basic methods for opening a PopUp window using Javascript?
What is the difference of "setTimeout" function and setInterval functions in Javascript
How do you submit a form using Javascript ?
Explain with an example the use of event handlers in JavaScript.
How to open a window with no toolbar, but with the location object.
How to reload the current page
Difference between window.onload and onDocumentReady?