Please see here: http://jsfiddle.net/nShQs/
Press the disable button and then the enable button. The checkbox doesn\'t get enabled.
HTML:
Set the disabled
property rather than the attribute (fiddle).
function enable() {
document.getElementById("check").disabled = false;
}
function disable() {
document.getElementById("check").disabled = true;
}
A control will remain disabled if the disabled
attribute is present at all - regardless of its value (fiddle). Setting the disabled
property to false
will remove the disabled
attribute.