修改网页时钟代码

来源:百度知道 编辑:UC知道 时间:2024/05/01 17:16:03
这段代码是我在网上下的,可以显示年月日、星期几、时间``
但是我只想要时、分、秒,不想要年月日、星期几
怎么改哦?``

<SCRIPT language=JavaScript>
document.write('<table width="100" height=70 border=0 cellpadding=0 cellspacing=0><tbody><tr><td valign=bottom width="100" height=20><p align=center>');
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i] }
document.write("<font color=800040>",today.getYear(),"<font color=#800040>年","<font color=#800040>",today.getMonth()+1,"<font color=#800040>月","<font color=#800040>",today.getDate(),"<font color=#800040>日 </FONT>");
var d=new initArray("<font color=#800040>星期日","<font color=#800040>星期一","<font color=#800040>星期二","<fo

<body onload=s()>
<script>
function s()
{
var x,h,m,s,n;
var x = new Date();
h=x.getHours();
m=x.getMinutes();
s=x.getSeconds();
n=h+":"+m+":"+s;
c.innerHTML=n
setTimeout("s()",1000);
}
</script>
<div id=c></div>
</body>

<SCRIPT language=JavaScript>
document.write('<table width="100" height=70 border=0 cellpadding=0 cellspacing=0><tbody><tr><td valign=bottom width="100" height=20><p align=center>');

function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i] }
document.write('</p></td></tr><tr><td width="100" height=30 ><font color=800040><p align=center><span id=