Can anyone please tell me how to disable a textbox, if a checkbox is checked, and enable textbox if the checkbox is not checked?
Put this in the checkbox:
onclick="document.getElementById('IdOfTheTextbox').disabled=this.checked;"
2.1m questions
2.1m answers
60 comments
56.9k users