Event BubblingWith bubbling , the event is first captured and handled by the innermost element and then propagated to outer elements. Only certain events can bubble. Events that do bubble have this property set to true. You can use this property to check if an event is allowed to bubble or not. At present, all the modern browsers have event bubbling as the default way of event flow.
Click anywhere inside Div
<form onclick="alert('Event from form')" style="border: 2px solid blue;width:200px ; ">FORM <div onclick="alert('Event from div')" style="border: 2px solid green;width:150px ; ">DIV <p onclick="alert('Event from p')" style="border: 2px solid red; width:100px; ">P</p> </div> </form>
- What is noscript tag?
- Difference between '=', '==' and '===' operators?
- What is Browser Object Model
- How to test a string as a literal and as an object ?
- What is Associative Array? How do we use it?
- What's the Difference Between Class and Prototypal Inheritance?
- What is the difference between .call() and .apply()?
- What is an immediately-invoked function expression?
- What Are RESTful (REpresentational State Transfer)Web Services?
- TypeError: document.getelementbyid(...) is null
- What's the difference between Null and Undefined?