Edit This Code:
<!DOCTYPE html>
<html>
<body>

<h1>My First JavaScript</h1>

<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()"
>

Click me to display Date and Time.</button>

<p id="demo"></p>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy