HTML DOM click() Method
Complete Checkbox Object Reference
Definition and Usage
The click() method is used to simulate a mouse-click on a checkbox.
Syntax
Example
The following example simulates a mouse-click on a checkbox:
<html>
<head>
<script type="text/javascript">
function clickCheckbox()
{
document.getElementById('check1').click()
}
</script>
</head>
<body>
<form>
<input type="checkbox" id="check1" />
<br />
<input type="button" onclick="clickCheckbox()"
value="Click checkbox" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Simulate
a mouse-click on a checkbox
Complete Checkbox Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|