Answers for "disable button while checkbox checked enable in javascript"

1

how to enable a button when a checkbox is selected in javascript

<input onclick="alert('thank you for agreeing to the terms and conditions')" type="submit" name="sendNewSms" class="inputButton" id="sendNewSms" value=" i agree to the terms and conditions " />

<input type="checkbox"  onchange="document.getElementById('sendNewSms').disabled = !this.checked;" />
Posted by: Guest on June-23-2021

Code answers related to "disable button while checkbox checked enable in javascript"

Browse Popular Code Answers by Language