코딩 관련/Javascript와 jQuery, JSON

[JAVASCRIPT] javascript radio check control

메리짱123 2022. 10. 11. 16:30
반응형

vanilla js로 radio 타입 체크 여부 control

<input type="radio" name="pick" value="1">
<input type="radio" name="pick" value="2">
<input type="radio" name="pick" value="3">
document.getElementsByName('pick').item(3).checked=true
반응형