Mega Code Archive

 
Categories / JavaScript Tutorial / Form
 

Radio onFocus()

The onFocus event handler is an event handler that notifies you when the focus is set on the radio button. <html>     <head>     <title> Example of the radio onFocus event handler</title>     </head>     <body>     <script language="JavaScript">     <!--     function showFocus(){          alert("Focus set on Box 1");     }     -->     </script>     <form name="form1">     Click on the radio button     <br><br>     <input type="radio" name=button1 onFocus='showFocus()'>Box 1     </form>     </body>     </html>