Skip to content

Instantly share code, notes, and snippets.

@gregperes
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregperes/609339189b4e683cd863 to your computer and use it in GitHub Desktop.
Save gregperes/609339189b4e683cd863 to your computer and use it in GitHub Desktop.
Palestra Arquitetura Web Desacoplada
<!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