HTML DOM click() Method
Complete Radio Object Reference
Definition and Usage
The click() method is used to simulate a mouse-click on a radio button.
Syntax
Example
The following example simulates a mouse-click on a radio button:
<html>
<head>
<script type="text/javascript">
function clickRadio()
{
document.getElementById('radio1').click()
}
</script>
</head>
<body>
<form>
<input type="radio" id="radio1" />
<br />
<input type="button" onclick="clickRadio()"
value="Click radio button" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Simulate a
mouse-click on a radio button
Complete Radio Object Reference
|
|
|