怎么用ASP在网页上显示动态时间?

从网上复制的也可以,说明一下代码具体放的位置!... 从网上复制的也可以,说明一下代码具体放的位置! 展开
 我来答
小陈峰動JNd8
2014-07-12 · TA获得超过119个赞
知道答主
回答量:111
采纳率:0%
帮助的人:100万
展开全部
具体放哪里请看这个就知道了: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>网页特效</title> </head> <body onload=startclock()> <form name="clock"> <script language="JavaScript"> var timerID = null; var timerRunning = false; function stopclock (){ if(timerRunning) clearTimeout(timerID); timerRunning = false;} function startclock () { stopclock(); showtime();} function showtime () { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds() var timeValue = now.getYear()+"年"+(now.getMonth()+1)+"月"+now.getDate()+"日" +((hours >= 12) ? " 下午 " : " 上午 " ) timeValue += ((hours >12) ? hours -12 :hours) timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds document.clock.thetime.value = timeValue; timerID = setTimeout("showtime()",1000); timerRunning = true;} </script> <input name="thetime" style="font-size: 9pt;color:#000000;border:1px solid #FFFFFF; ; " size="28"></form> </body> </html>
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式