江西财经大学吧 关注:207,245贴子:4,944,635

回复:现在几点?进来看看这时钟就知道..

只看楼主收藏回复

切!转帖就是转帖,应该表明
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
if (timeValue == "0") timeValue = 12;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
document.clock.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock() {
stopclock();
showtime();
}
// End -->
</SCRIPT>


IP属地:山东16楼2007-05-14 19:19
回复
    怀念乒乓~
    归去来兮....


    18楼2007-05-14 22:35
    回复
      2026-01-09 17:13:10
      广告
      不感兴趣
      开通SVIP免广告
      • 218.87.6.*
      回milkmop,我承认代码不属于楼主写的, 但是在贴吧以图片格式动态显示时间绝对是楼主自己想到的。创新了嘛,不算转帖。呵呵


      19楼2007-05-15 12:39
      回复