I've tried select(); check(); and even .selected = true; but I still haven't gotten around to selecting that radio button. Is there any way I can accomplish this?
You have to use the checked property:
element.checked = true;
Reference: HTMLInputElement
<input type=radio id='r'>
<script>
document.getElementById('r').checked=true;
</script>
Use .checked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With