Radio.focus() : Radio Button : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Radio Button »

 

Radio.focus()







The focus() method sets the focus to the radio button.












<html>
    <head>
    <title> Example of the radio focus method</title>
    </head>
    <body>
    <form name="form1">
    <input type="radio" name=button1>Box 1
    <br>
    <input type="radio" name=button2>Box 2
    <br><br>
    <input type="button" value="Set Focus to Box 1" onClick='document.form1.button1.focus()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Radio Button