Apologies if this has already been asked, i have found it difficult to use the answers I have found to use in my code.
Basically, I have a "receive" button, that when the user clicks, will receive an email. But, I want a tick box checked in order for the button to become clickable. I have a code that kind of works, but when the page first loads, the "Receive" button is already clickable. However, when I click the tick box then unclick it, it disables the button.
<td>
<input type="checkbox" id="tick" onchange="document.getElementById('terms').disabled = !this.checked;" />
<td>
<p> I agree to the <a href="terms.html" target="_blank">Terms & Conditions</a></p>
</td>
</td>
</tr>
<td class="label1"></td>
<td align="right">
<button type="submit" class="btn btn1" name="terms" id="terms">Receive</i></button>
</td>
Aucun commentaire:
Enregistrer un commentaire