Skip to content

Instantly share code, notes, and snippets.

@youcoldfusion
Created December 11, 2017 13:34
Show Gist options
  • Save youcoldfusion/eeadbe11360e86bf983b3ae4b858d3db to your computer and use it in GitHub Desktop.
Save youcoldfusion/eeadbe11360e86bf983b3ae4b858d3db to your computer and use it in GitHub Desktop.
A Sample Javascript file with HTML5
<!DOCTYPE html>
<html>
<body>
<h2>A Sample Javascript File</h2>
<p id="demo">It is a text from a paragraph</p>
<button type="button" onclick="myFunction()">Animesh:Click on the button</button>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Text value of the paragraph has been chnaged";
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment