Created
October 20, 2012 02:03
-
-
Save seanhess/3921701 to your computer and use it in GitHub Desktop.
Example.html
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
<html> | |
<head> | |
<style> | |
button { | |
width: 400px; | |
} | |
.bob { | |
background-color: blue; | |
} | |
</style> | |
<script> | |
function doSomethingWhenYouClickAButton(name) { | |
console.log("HELLO") | |
console.log("Hi " + name) | |
var items = document.getElementById("items") | |
console.log(items.innerHTML) | |
items.innerHTML = items.innerHTML + "<div>" + name + "</div>" | |
console.log("HUH", items.innerHTML) | |
} | |
</script> | |
</head> | |
<body> | |
<h1>Hello</h1> | |
<button class="bob">Hello</button> | |
<button onclick="doSomethingWhenYouClickAButton('Sean')">Sean</button> | |
<button onclick="doSomethingWhenYouClickAButton('Ty')">Ty</button> | |
<button onclick="doSomethingWhenYouClickAButton('Lee')">Lee</button> | |
<div class="bob">lkjdsfjkllkjfds</div> | |
<a href="http://google.com">Google</a> | |
<input value="value"> | |
<div id="items"> | |
hello? | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment