<p id="today"></p>
<script>
// Conver month and day to 2 digits with leading zero
function to2(t)
{
return (t<10 ? "0"+t : t );
}
// Get the personal computer date using JavaScript
// YYYY-MM-DD hh:mm:ss
function get_today()
{
d = new Date();
var today = new Date();
return today.getFullYear()+'-'+to2(today.getMonth()+1)+'-'+to2(today.getDate())+" "+
to2(today.getHours()) + ":" +to2(today.getMinutes()) + ":" + to2(today.getSeconds());
}
document.getElementById("today").value = get_today();
</script>