Skip to content

Instantly share code, notes, and snippets.

@greeneggsandmushrooms
Created October 29, 2017 19:38
Show Gist options
  • Save greeneggsandmushrooms/2bad339403592100e063b2f982619deb to your computer and use it in GitHub Desktop.
Save greeneggsandmushrooms/2bad339403592100e063b2f982619deb to your computer and use it in GitHub Desktop.
35 Bin // source http://jsbin.com/degivot
<!DOCTYPE html>
<html>
<head>
<title>35 Bin</title>
<style id="jsbin-css">
p{
color:red;
}
</style>
</head>
<body>
<p id="paragraphText">This is awesome </p>
<p id="paragraphText2">This is awesome </p>
<button onclick="changeTheText()">Change the text</button>
<script id="jsbin-javascript">
function changeTheText(){
//change the paragraph text
document.getElementById("paragraphText").innerHTML="We changed the text!"
document.getElementById("paragraphText2").innerHTML="We also changed the text!"
}
</script>
<script id="jsbin-source-css" type="text/css">p{
color:red;
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">function changeTheText(){
//change the paragraph text
document.getElementById("paragraphText").innerHTML="We changed the text!"
document.getElementById("paragraphText2").innerHTML="We also changed the text!"
}</script></body>
</html>
function changeTheText(){
//change the paragraph text
document.getElementById("paragraphText").innerHTML="We changed the text!"
document.getElementById("paragraphText2").innerHTML="We also changed the text!"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment