Radio.onClick

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

onClick="command"

Description

The onClick property of the Radio object is an event handler that notifies you when the mouse has been clicked on the button.

Example

Listing 7.440 uses the onClick event handler to check for a mouse click event.

Listing 7.440 Example of the onClick Event Handler
<html>
<head>
<title> Example of the radio onClick event handler</title>
</head>
<body>

<form name="form1">
<input type="radio" name=button1 onClick='alert("mouse was clicked on this object")'>Box 1
<br>
</form>

</body>
</html>
							
							
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.