Question :What does calling preventDefault() on an event do? How is this enforced?
Answer :Cancels an event's default behavior if that behavior can be canceled.. For example, the
doubleClick event has an associated default behavior that highlights the word under the mouse
pointer at the time of the event. Your event listener can cancel this behavior by calling the
preventDefault() method.
You can use the Event.cancelable property to check whether you can prevent the default behavior
associated with a particular event. If the value of Event.cancelable is true, then preventDefault() can
be used to cancel the event; otherwise, preventDefault() has no effect.
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Friday, March 27, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment