Simulates a mouse click on the current element.
Simulating a click event on an element with the click method causes the default action of the event to be performed, but the element does not get the focus. For example, invoking the click method on a checkbox toggles its checked state, invoking the click method on an input field does not cause the input field to get the focus.
You can find the related objects in the Supported by objects section below.
This method has no return value.
Example HTML code 1:
This example illustrates the use of the click method:
Did you find this example helpful?
User Contributed Comments