Monday, April 20, 2020

How to disable a option in a set of radio buttons

<input type="radio" name="disableme" id="1"> Animal
<input type="radio" name="disableme" id="2"> Mammal <input type="radio" name="disableme" id="3"> Human
document.getElementById("1").disabled = true;

source:

 https://www.w3schools.com/jsref/prop_radio_disabled.asp

https://stackoverflow.com/questions/13245672/how-to-disable-the-radio-button-using-javascript-not-using-any-js-framework

No comments:

Post a Comment

Machine Learning certification course

A certification course in ML by Code Basics