查看: 541|回复: 2
|
Java Script 问题!
[复制链接]
|
|
Stamp=new Date();
var Hours;
var Mins;
var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
Time = " PM.";
}
else {
Time = " AM.";
}
if (Hours > 12) {
Hours -= 12;
}
if (Hours == 0) {
Hours = 12;
}
Mins = Stamp.getMinutes();
if (Mins < 10) {
Mins = "0" + Mins;
}
document.write('<font size="2" face="Arial,Geneva,Sans Serif"><B>'+"TIME : "+ Hours + ":" + Mins + Time +
'</B></font>');
时间为何在 refresh web page 时才会变?
怎样把它,每分钟都会自动变? |
|
|
|
|
|
|
|
发表于 16-4-2006 10:36 AM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 16-4-2006 12:51 PM
|
显示全部楼层
红发兄,上次你post的,我copy 了,再paste....还是做不出来!
根本没东西。
和没说明!还是谢谢你。 |
|
|
|
|
|
|
| |
本周最热论坛帖子
|