Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to select default radio button

<html>
   <form id="radiobuttons" name="radiobutton">
      <input id="rad1" value="a" type="radio" name="check"/>male
      <input id="rad2" value="b" type="radio" name="check"/>female
      <input id="rad3" value="c" type="radio" name="check"/>other
   </form>
<body>
<script>
   radiobtn = document.getElementById("rad1");
   radiobtn.checked = true;
</script>
</body>
</html>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #default #radio #button
ADD COMMENT
Topic
Name
7+4 =