Date and Time button:

This script will make a button that when clicked will pop up an alert displaying the current date and time.


This code goes into the BODY section:



OR you could also use the code below:


<button
name="Check Time" onClick="alert('Today\'s Date is '+ Date())">Click here to see the time
</button>

Click here to go back.