what is event handling and event bubbling?
javascript event
1258
10-May-2018
Updated on 06-Jun-2018
Prakash nidhi Verma
06-Jun-2018When JS called by HTML index. Javascript can "react" on these events.Often, when events happen, according to your choice of events. JavaScript lets you execute code when events are detected.
code content of its own element(using this.outerHTML):
Javascript is several long type of text code. It is more common to see event attributes by calling thefunctions:
for more info go on HTML DOM Events.
Event handling :-
only assigned function is work for event handler, that function is run when that event occurs otherwise not.
Type of event handler:
1-Interactive event handlers
2-Non-Interactive event handlers
Event Bubbling :-
When an event happens on an element, it first runs for handelers, on its parent, then all the way up on other ancestors.
in the above code we got three layer boxes most outer box is Form, after that DIV and most deeply nested is P.
Happy Coding :)