<html>
<head>
<script>
function disableSubmit() {
document.getElementById("submit").disabled = true;
}
function activateButton(element) {
if(element.checked) {
document.getElementById("submit").disabled = false;
}
else {
document.getElementById("submit").disabled = true;
}
}
</script>
</head>
<body onload="disableSubmit()">
<input type="checkbox" name="terms" id="terms" onchange="activateButton(this)"> I Agree Terms & Coditions
<br><br>
<input type="submit" name="submit" id="submit">
</body>
</html>
HTML checkbox & Submit Button by Agreeing on Terms and Condition
-
06-10-2022 - |
Pregunta
I'm designing an html page for WiFi authentication and I would like to introduce in this page a Checkbox and Submit button, upon reading the Terms and Condition and Checking the CheckBox, the Submit button will be active.
Is this doable?
thanks,
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow