Posts

Showing posts with the label eventListener

javascript : .on(eventName,eventHandlerFunction)

  javascript : .on( eventName,eventHandlerFunction ) .on( eventName.NameSpace,eventHandlerFunction ) Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : It register  eventHandlerFunction  with element on triggering of  eventName   . It is the easy way to use of  addEventListener  method. eventName  : name of event that trigger the event handler function. .NameSpace  : optional for registring more than one eventHandlerFunction with an event . eventHandlerFunction  : function that register with event and executes when event fired. The [ this ] refer to the object with that eventName is register within the eventHandlerFunction. The [ e ] argument of eventHandlerFunction received the event object of event. Note: It register only one eventHandlerFunction with one event. If you want to register more than one  eventHandlerFunction...