alt
Advertisement
Online Training
Career Series
Exforsys
Exforsys arrow Tutorials arrow JavaScript arrow JavaScript Event Object Properties and Methods
Site Search


JavaScript Event Object Properties and Methods
Article Index
JavaScript Event Object Properties and Methods
JavaScript event Object Methods

Methods of event object:

  • preventDefault()
  • stopPropagation()

preventDefault():

The preventDefault() method is supported by Navigator and is equivalent of the returnValue property of event object supported by Internet Explorer. The preventDefault()method of Navigator is used to denote the event handler's return value. A Boolean true value is set to indicate canceling of any default action for the event handler.

stopPropagation():

The stopPropagation() method is supported only by Navigator and is equivalent of the cancelBubble property of event object supported by Internet Explorer. The stopPropagation()method of Navigator is used to enable or disable the event bubbling concept of an event object. The value of the stopPropagation()method is set to true to prevent the event from bubbling and if it is set to false, the event bubbling is enabled.


Trackback(0)
Comments (0)add comment

Write comment

busy

 
< Prev   Next >
Sponsored Links
© 2008 Exforsys.com
Joomla! is Free Software released under the GNU/GPL License.
Page copy protected against web site content infringement by Copyscape