Javascript Reference
Categories: event

javascript event preventDefault( )

@March 15, 2008, 1:22 a.m.
preventDefault( ) Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 2

 

 

Instructs the current event to bypass the normal operation it performs on the node. Once set, the mode cannot be undone for the current event. The following Netscape 6 event listener function for an onkeypress event allows only numbers to be entered into a text field:

function numsOnly(evt) {
    if (evt.charCode< 48 || evt.charCode > 57) {
        evt.preventDefault( );
    }
} 
 

This method is the equivalent of assigning false to the IE event.returnValue property, or having an event handler evaluate to return false.

 
Parameters

None.

 
Returned Value

None.

stromectol pills - <a href="https://ivercand.com/">ivermectin 3mg over the counter</a> tegretol 400mg usa
Bdglbk - 4 days
promethazine where to buy - <a href="https://prometacin.com/asciprofloxacin/">ciplox without prescription</a> order lincocin generic
Echkne - 1 weeks
provigil 200mg brand - <a href="https://provicef.com/cefadroxil/">buy cefadroxil 250mg online cheap</a> lamivudine for sale
Wcmouj - 1 weeks

Powered by Linode.