Skip to content

Events

IT Notes → Javascript @ December 22, 2020

  • Adding events as an attribute to an HTML element is sometimes known as an inline model or inline registration model.
  • The approach of assigning a function to an event handler that is an object property is sometimes called the traditional model or traditional registration model.
  • To remove the event we write window.onload=null;
  • One event handler is allowed for any given event and object.
  • var theEvent = nsEvent ? nsEvent : window.event;
  • Most modern browsers, the event proceeds down the stack of elements, each captured in turn. It then bubbles back up (from event clicked to the document), firing the event handlers as it goes.
  • Corresponding to addEventListener and removeEventListener in Netscape we have attachEvent and detachEvent.
  • Syntax: object.addEventListener(‘event’,eventFunction,boolean); If Boolean is False, Bubble Up.
  • Generating Events: focus(), reset(), submit();

 

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x