如需转载,请注明出处,谢谢;
功能显示:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<span><script language=JavaScript>
function showTime(){
var enable=0; today=new Date();
var day; var date;
var time_start = new Date();
var seconds=0;
var clock_start = time_start.getTime();
if(today.getDay()==0) day="星期日"
if(today.getDay()==1) day="星期一"
if(today.getDay()==2) day="星期二"
if(today.getDay()==3) day="星期三"
if(today.getDay()==4) day="星期四"
if(today.getDay()==5) day="星期五"
if(today.getDay()==6) day="星期六"
if(today.getSeconds()<10){ seconds="0"+today.getSeconds()}else{ seconds=today.getSeconds()}
date=(today.getFullYear())+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日 "+today.getHours()+"时"+today.getMinutes()+"分"+seconds+"秒"+" "+day;
document.getElementById("liveclock1").innerText = "北京时间:"+date; //div的html是now这个字符串
setTimeout("showTime()",1000); //设置过1000毫秒就是1秒,调用showtime方法
}
</script>
<script language="javascript">
window.οnlοad=function(){
showTime();
}
</script>
</span>
<span id="liveclock1" style="color:blue"></span>
</BODY>
</HTML>