Element.click() (Method)

Sends a click event to the receiving object to trigger its onclick event handler.

Availability:

JScript - 3.0
Internet Explorer - 4.0
Property/method value type:undefined
JavaScript syntax:IEmyElement.click()

This is supported by most objects on MSIE but only input objects on Netscape, and this is still true in version 6.0.

It simulates the effect of a mouse click on the object. This should trigger the event handler for the onclick event. That handler would be a function object and a reference to it should be available in the onclick property of the receiving object.

The handler function may have been registered by assigning the function object reference to the property user script control or it may have been registered with the onClick HTML tag attribute in the tag that instantiates the object.

See also:onClick