Created
June 28, 2017 04:44
-
-
Save chintamanand/e6647a7865d90f5628f5175db542faf6 to your computer and use it in GitHub Desktop.
// source https://jsbin.com/jifituk
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> | |
<body> | |
<p>JavaScript can change the color.</p> | |
<h5 onmouseover="changecolor1()">red</h5> | |
<h5 onmouseover="changecolor2()">yellow</h5> | |
<h5 onmouseover="changecolor3()">blue</h5> | |
<h5 onmouseover="changecolor4()">orange</h5> | |
<h5 onmouseover="changecolor5()">pink</h5> | |
<script> | |
function changecolor1(){ | |
document.body.style.backgroundColor="red"; | |
} | |
function changecolor2(){ | |
document.body.style.backgroundColor="yellow"; | |
} | |
function changecolor3(){ | |
document.body.style.backgroundColor="blue"; | |
} | |
function changecolor4(){ | |
document.body.style.backgroundColor="orange"; | |
} | |
function changecolor5(){ | |
document.body.style.backgroundColor="pink"; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment