This script will make a button that when clicked will pop up an alert displaying the current date and time.
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>