Skip to content

Instantly share code, notes, and snippets.

@brunokruse
Created September 22, 2017 17:39
Show Gist options
  • Save brunokruse/b1551701b05968e2ab7ab437ab0a0536 to your computer and use it in GitHub Desktop.
Save brunokruse/b1551701b05968e2ab7ab437ab0a0536 to your computer and use it in GitHub Desktop.
simple html / javascript
<html>
<head>
<style>
body {
background: #FF00AA
}
</style>
</head>
<body>
<h2 id="myTitle">Pokemon Game</h2>
<div id="myResult"></div>
<script>
function growl() {
console.log("growl");
}
function lightningAttack() {
console.log("now doing lightningAttack");
var myName = "hello"
if (myName == "hello") {
}
}
function main() {
console.log("now main is happening");
lightningAttack();
document.getElementById("myResult").innerHTML = "hello";
document.getElementById("myTitle").innerHTML = "SVA";
}
main();
</script>
<button onClick="lightningAttack()" value="lightningAttack">lightning attack</button>
<button onClick="growl()" value="growl"> growl</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment