Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var greenEl = document.getElementById("green");
- var greenCh = function(){
- document.body.style.backgroundColor = "green";
- };
- greenEl.addEventListener("click", greenCh);
- function redCh(){
- document.body.style.backgroundColor = "red";
- }
- function blueCh(){
- document.body.style.backgroundColor = "blue";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement