javascript - How do I change which radio button is selected using a function? -


i have radio group of 3 choices of first selected default. want make second 1 selected upon clicking item. have...

function selectss() {     document.getelementbyid("width").value=16;     document.getelementbyid("gauge_1").checked; } 

i use onclick call function, value of width changes 16 supposed how select radion button id gauge_1?

you have set checked state true, use:

document.getelementbyid("gauge_1").checked = true; 

in code, you're getting , doing nothing it.

reference:


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -