Prince Singh
0
Q:

html radio button checked

function check(id) {
  document.getElementById(id).checked = true;
}
2
  <input type="radio" id="huey" name="drone" value="huey"
         checked> 
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio-->
3
checked="checked"
2
<input type="radio" id="male" name="gender" value="male">
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label><br>
<input type="radio" id="other" name="gender" value="other">
<label for="other">Other</label>
2
//checked
  <input type="radio" id="huey" name="drone" value="huey"
         checked>
1
<input type="radio" name="imgsel" value="" checked>
0

New to Communities?

Join the community