Input Radio disabled Property - Find out if a radio button is disabled or not: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Radio

Description

Input Radio disabled Property - Find out if a radio button is disabled or not:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

Radio Button: <input type="radio" id="myRadio">

<button onclick="disable()">Disable radio button</button>
<button onclick="enable()">Enable radio button</button>

<script>
function disable() {/*from ww  w .j a va 2s  .c o m*/
    document.getElementById("myRadio").disabled = true;
}

function enable() {
    document.getElementById("myRadio").disabled = false;
}
</script>

</body>
</html>

Related Tutorials