Skip to content

Instantly share code, notes, and snippets.

@HaxxonHax
Last active February 8, 2017 15:52
Show Gist options
  • Save HaxxonHax/64523fe77806690ea156dbdbb3ca00ac to your computer and use it in GitHub Desktop.
Save HaxxonHax/64523fe77806690ea156dbdbb3ca00ac to your computer and use it in GitHub Desktop.
<!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