Please tell me if the input disabled
, it is set to chek. How to make that check was not installed if input disabled
?
function check(number) { document.getElementById('stol['+number+']').checked = true; }
<input type="radio" class="stoli" name="stol" id="stol[1]" > <input type="radio" class="stoli" name="stol" id="stol[2]" disabled><br> <a onclick="check(2)">Check</a>
disabled
attribute is intended for users . It does not affect the effect of JS scripts. - hindmostdisabled
. If the element isdisabled
, then do not setchecked = true
- Bogdan