Last active
November 28, 2015 00:46
-
-
Save jazzyjackson/b6b0ca575a6d295bcc6c 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
<button id="turnBlack">Black</button> | |
<button id="turnWhite">White</button> | |
<script> | |
var turnBlackButton = document.getElementById("turnBlack") | |
var turnWhiteButton = document.getElementById("turnWhite") | |
function turnBlack() { | |
document.body.style.background = 'black' | |
} | |
function turnWhite() { | |
document.body.style.background = 'white' | |
} | |
turnBlackButton.onclick = turnBlack | |
turnWhiteButton.onclick = turnWhite | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment