<html>
<head>
<title>JavaScript </title>
</head>
<body>
<script language="javascript">
function showtime()
{
var today,hour,second,minute,year,month,date;
var strDate ;
today=new Date();
var n_day = today.getDay();
switch (n_day)
{
case 0:{
strDate = " "
}break;
case 1:{
strDate = " "
}break;
case 2:{
strDate =" "
}break;
case 3:{
strDate = " "
}break;
case 4:{
strDate = " "
}break;
case 5:{
strDate = " "
}break;
case 6:{
strDate = " "
}break;
case 7:{
strDate = " "
}break;
}
year = today.getYear();
month = today.getMonth()+1;
date = today.getDate();
hour = today.getHours();
minute =today.getMinutes();
second = today.getSeconds();
if(month<10) month="0"+month;
if(date<10) date="0"+date;
if(hour<10) hour="0"+hour;
if(minute<10) minute="0"+minute;
if(second<10) second="0"+second;
document.getElementById('time').innerHTML = year + " " + month + " " + date + " " + strDate +" " + hour + ":" + minute + ":" + second; //
setTimeout("showtime();", 1000); // 1000 ms(1 s)
}
</script>
<div id="time"></div>
<script language="javascript"> showtime();</script>
</body>
</html>