Radio : Radio Button : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Radio Button »

 

Radio









The Radio object represents a check box within an HTML form.

A check box is created using the HTML tag and specifying the TYPE attribute as radio.



























































Property/Method Description
blur() Removes focus from Radio object
checked Specifies whether a button is checked or unchecked
click() Simulates a mouse click on the button
defaultChecked Refers to the CHECKED attribute of the HTML tag
focus() Sets the focus to a button
form Refers to the Form object that contains the Radio object
handleEvent() Invokes the default handler for the specified event
name Refers to the NAME attribute of the HTML tag
onBlur Event handler for Blur event
onClick Event handler for Click event
onFocus Event handler for Focus event
type Refers to the TYPE attribute of the HTML tag
value Refers to the VALUE attribute of the HTML tag















<html>
    <head>
    <title> Example of the Radio object title>
    </head>
    <body>
    <form name="form1">
    <input type="radio" name=button1 ?onClick='alert(document.form1.button1.name)'>Box 1
    <br>
    <input type="radio" name=button2>Box 2
    <br>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Radio Button