Javascript examples for DOM HTML Element:Input Radio
The Input Radio object represents an HTML <input> element with type="radio".
You can access an <input> element with type="radio" by using getElementById():
<!DOCTYPE html> <html> <body> Radio Button: <input type="radio" id="myRadio"> <button onclick="myFunction()">check the radio button</button> <script> function myFunction() {/* ww w . ja va2 s. c om*/ var x = document.getElementById("myRadio"); x.checked = true; } </script> </body> </html>