WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Input Radio Object


Input Radio Object

The Input Radio item speaks to a HTML <input> component with type="radio".

Access an Input Radio Object

You can get to a <input> component with type="radio" by utilizing getElementById():

var x = document.getElementById("myRadio"); Try it

Tip: You can likewise get to <input type="radio"> via seeking through the elements accumulation of a form.

Create an Input Radio Object

You can make a <input> component with type="radio" by utilizing the document.createElement() method:

var x = document.createElement("INPUT");
x.setAttribute("type", "radio");
Try it

Input Radio Object Properties

= Property included HTML5.

Property Description
autofocus Sets or returns whether a radio catch ought to consequently get center when the page loads
checked Sets or returns the checked condition of a radio button
defaultChecked Returns the default estimation of the checked attribute
defaultValue Sets or returns the default estimation of a radio button
disabled Sets or returns whether the radio catch is handicapped, or not
form Returns a reference to the structure that contains the radio button
name Sets or returns the estimation of the name trait of a radio button
required Sets or returns whether the radio catch must be checked before presenting a form
type Returns which sort of structure component the radio catch is
value Sets or returns the estimation of the esteem characteristic of the radio button

Input Radio Object Methods

Method Description
blur() Removes center from a radio button
focus() Gives center to a radio button

Standard Properties and Events

The Input Radio article likewise bolsters the standard properties and events.