HTML DOM click() Method
Complete Button Object Reference
Definition and Usage
The click() method simulates a mouse-click on a
button.
Syntax
Example
The following example simulates a mouse-click on a button on body onload:
<html>
<head>
<script type="text/javascript">
function clickButton()
{
document.getElementById('button1').click()
}
function alertMsg()
{
alert("Button 1 was clicked!")
}
</script>
</head>
<body onload="clickButton()">
<form>
<input type="button" id="button1" onclick="alertMsg()"
value="Button 1" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Simulate a
mouse-click on a button
Complete Button Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|