Local time and local date
<html> <head> <title>the date</title> </head> <body> <p id="dateField"> </p> <script type = "text/javascript"> var myDate = new Date(); var dateString = myDate.toLocaleDateString() + " " + myDate.toLocaleTimeString(); var dateLoc = document.getElementById("dateField"); dateLoc.innerHTML = "Now: " + dateString; </script> </body> </html>