Skip to content

Instantly share code, notes, and snippets.

@carlosrojaso
Last active August 29, 2015 14:01
Show Gist options
  • Save carlosrojaso/4a670a585b3d3f1b0dec to your computer and use it in GitHub Desktop.
Save carlosrojaso/4a670a585b3d3f1b0dec to your computer and use it in GitHub Desktop.
JS hello
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript</h1>
<p>Click Date to display current day, date, and time.</p>
<button type="button" onclick="myFunction()">Date</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = Date();
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment