-
-
Save gregperes/609339189b4e683cd863 to your computer and use it in GitHub Desktop.
Palestra Arquitetura Web Desacoplada
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>DHTML</title> | |
<style> | |
body { background-color: blue; } | |
</style> | |
<script type="text/javascript"> | |
window.onload = function () { | |
document.getElementById("redbutton").onclick = function () { | |
document.body.style.background = "red"; | |
}; | |
document.getElementById("yellowbutton").onclick = function () { | |
document.body.style.background = "yellow"; | |
}; | |
}; | |
</script> | |
</head> | |
<body> | |
<button id="redbutton">Red</button> | |
<button id="yellowbutton">Yellow</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment