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

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -