作者在 2010-03-16 16:34:56 发布以下内容
<span id="d"></span>
<script language="javascript">
function mytime()
{
var d,s="";
d=new Date();
s+=d.getYear()+"年";
s+=(d.getMonth()+1)+"月";
s+=d.getDate()+"日,星期";
s+="日一二三四五六".substr(d.getDay(),1)+",";
s+=d.Hours()+"时";
s+=d.Minutes()+"分";
s+=d.getSeconds()+"秒";
document.getElementById("d").innerText=s;
setTimeout("mytime()",1000);
}
window.onload=mytime
</script>
<script language="javascript">
function mytime()
{
var d,s="";
d=new Date();
s+=d.getYear()+"年";
s+=(d.getMonth()+1)+"月";
s+=d.getDate()+"日,星期";
s+="日一二三四五六".substr(d.getDay(),1)+",";
s+=d.Hours()+"时";
s+=d.Minutes()+"分";
s+=d.getSeconds()+"秒";
document.getElementById("d").innerText=s;
setTimeout("mytime()",1000);
}
window.onload=mytime
</script>