Skip to content

Instantly share code, notes, and snippets.

@tonomoshia
Forked from anonymous/index.html
Created April 27, 2016 03:24
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 tonomoshia/8c74754cc491f1d4d762828bd7e786e1 to your computer and use it in GitHub Desktop.
Save tonomoshia/8c74754cc491f1d4d762828bd7e786e1 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/loqese
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<h1 id="h1changed">This is Javascript</h1>
<p id="pchanged">Change this text please!</p>
<button onclick="myAwesomeFunction()">Click me if you want to live</button> <br><br>
<button onclick="anotherFunction()">Another Function to run</button> <br> <br>
<button onclick="resetTheApp()">Reset the app!</button>
<script id="jsbin-javascript">
var score = 2;
var playerName = "Alicia";
function myAwesomeFunction() {
document.getElementById("h1changed").innerHTML = "Mammoth Interactive for the Win!";
}
function anotherFunction() {
document.getElementById("pchanged").innerHTML = "Another Function";
}
function resetTheApp() {
document.getElementById("h1changed").innerHTML = "Click me if you want to live";
document.getElementById("pchanged").innerHTML = "Change this text please!";
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">var score = 2;
var playerName = "Alicia";
function myAwesomeFunction() {
document.getElementById("h1changed").innerHTML = "Mammoth Interactive for the Win!";
}
function anotherFunction() {
document.getElementById("pchanged").innerHTML = "Another Function";
}
function resetTheApp() {
document.getElementById("h1changed").innerHTML = "Click me if you want to live";
document.getElementById("pchanged").innerHTML = "Change this text please!";
}</script></body>
</html>
var score = 2;
var playerName = "Alicia";
function myAwesomeFunction() {
document.getElementById("h1changed").innerHTML = "Mammoth Interactive for the Win!";
}
function anotherFunction() {
document.getElementById("pchanged").innerHTML = "Another Function";
}
function resetTheApp() {
document.getElementById("h1changed").innerHTML = "Click me if you want to live";
document.getElementById("pchanged").innerHTML = "Change this text please!";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment