Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

Sys.UI.DomEvent preventDefault Method

Prevents the default DOM event action from happening.

Syntax

var domEventVar = new DomEvent(eventObject);
domEventVar.preventDefault();

Remarks

Use the preventDefault method to prevent the default event action for the browser from occurring. For example, if you prevent the keydown event of an input element from occurring, the character typed by the user is not automatically appended to the input element's value.