Exforsys.com
 
Home Tutorials JavaScript
 

JavaScript Event Object Properties and Methods

 

JavaScript event Object Methods

Page 2 of 2


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.




First Page: JavaScript Event Object Properties and Methods


Read Next: JavaScript FileUpload Object



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape