Created
October 30, 2014 00:11
-
-
Save michalbe/75b2bca73591be8a91b4 to your computer and use it in GitHub Desktop.
Events test
This file contains hidden or 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> | |
<head> | |
<style> | |
div { | |
background-color: #f0f; | |
width: 300px; | |
height: 300px; | |
} | |
</style> | |
</head> | |
<body> | |
<a href="http://localhost:8080/ip/nestle-bottled-spring-water-1-2-liter-16-9-oz-24-bottles-pack/182653"> | |
<div id="test"></div> | |
</a> | |
<script> | |
var test = document.getElementById('test'); | |
test.addEventListener('click', function(){ | |
test.style.backgroundColor = "green" | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment