Last active
February 8, 2017 15:52
-
-
Save HaxxonHax/64523fe77806690ea156dbdbb3ca00ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<script> | |
function validateBox() { | |
var button = document.getElementById('mycheckbox'); | |
if ( button.checked === true ) { setTimeout(function () { | |
button.checked = false; }, 800); } | |
} | |
</script> | |
<body> | |
<center> | |
<input type="checkbox" id="mycheckbox" onClick="validateBox();" style="margin-left:auto;margin-right:auto;"></button> | |
<label for="mycheckbox">Check this box!</label> | |
</center> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment