Created
April 3, 2022 16:52
-
-
Save SmashedFrenzy16/1e63eb0163ec6d41390fc406b0ac87fb to your computer and use it in GitHub Desktop.
A date and time button made in JavaScript embedded into a HTML file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> JS Date And Time </title> | |
</head> | |
<h1> JS Date And Time </h1> | |
<body> | |
<button type="button" | |
onclick="document.getElementById('dateTime').innerHTML = Date()"> | |
Display Date and Time </button> | |
<p id="dateTime"></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment