Compartilhar via


Sys.UI.DomEvent preventDefault Method

Prevents the default DOM event action from happening.

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.

See Also

Reference

Sys.UI.DomEvent Class

Other Resources

Language Reference