preventDefault method
[This documentation is preliminary and is subject to change.]
Cancels the default action of an event.
![]() ![]() |
Syntax
HRESULT retVal = object.preventDefault();
Standards information
Parameters
This method has no parameters.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
If an event is cancelable, the preventDefault method signfies that the event should be canceled. Any event handler can cancel the default action. If the event cannot be canceled, this method has no effect.
A call to this method is similar to setting the returnValue event property to VARIANT_FALSE in Windows Internet Explorer 8 and earlier versions.
See also
Reference
Build date: 1/23/2012
.png)
.png)