社区
ASP
帖子详情
如何制作倒计时时钟(页面上)
mascotzhuang
2004-08-03 01:46:24
如题,是在页面上显示,而不是在Statusbar上显示。谢谢。
...全文
355
5
打赏
收藏
如何制作倒计时时钟(页面上)
如题,是在页面上显示,而不是在Statusbar上显示。谢谢。
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
andraw2002
2004-08-03
打赏
举报
回复
<script language="JavaScript" type="text/javascript">
<!--//
var hour,minute,second,totalSecond,actTime;
var isBegin;
totalSecond = 0;
hour = 0; minute = 0; second = 15; //设置作题时间
totalSecond = (hour * 60 * 60) + (minute * 60) + second;
isBegin = true;
function clock(intSign){
if(intSign==1){ //开始答题时
for(var i=0;i<document.St.length;i++){
var temp = document.St[i].name.substring(0, 3);
if(temp=="zd_"){
document.St[i].disabled = false;
}
}
}
var conHourToSecond,conMinuteToSecond;
conHourToSecond = 60 * 60; conMinuteToSecond = 60; //设置常量
if(totalSecond-- > 1){
var strHour,strMinute,strSecond;
strHour = Math.floor(totalSecond/conHourToSecond);
strMinute = Math.floor((totalSecond - strHour*conHourToSecond)/conMinuteToSecond);
strSecond = totalSecond - strHour*conHourToSecond - strMinute*conMinuteToSecond;
document.all.Clock.value = strHour + ":" + strMinute + ":" + strSecond;
actTime = window.setTimeout("clock(0)", 1000);
}else{
document.all.Clock.value = "0:0:0";
TimeOut();
alert("答题时间到!停止作答!");
window.clearTimeout(actTime);
}
}
function initClock(obj){ //初始时,不能作答,只有点击开始后才能作答
for(var i=0;i<document.St.length;i++){
var temp = document.St[i].name.substring(0, 3);
if(temp=="zd_"){
document.St[i].disabled = true;
}
}
obj.value = hour + ':' + minute + ':' + second;
}
function TimeOut(){ //答题时间到
for(var i=0;i<document.St.length;i++){
var temp = document.St[i].name.substring(0, 3);
if(temp=="zd_"){
document.St[i].disabled = true;
}
}
}
//-->
</script>
787912
2004-08-03
打赏
举报
回复
<script language=vbscript>
window.setInterval "showtime",1000
sub showtime
dim d1,d2
d1=cdate("2005-1-1 0:0:0")
d2=now
window.divtime.innerHTML="现在距离2005年1月1日0时0分0秒还有 <font color=red><b>" & clng((cdbl(d1)-cdbl(d2))*24*60*60) & "</b></font>秒"
end sub
</script>
tianjy
2004-08-03
打赏
举报
回复
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta name="vs_defaultClientScript" content="VBScript">
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body>
<div id=divtime></div>
<script language=vbscript>
window.setInterval "showtime",1000
sub showtime
dim d1,d2
d1=cdate("2005-1-1 0:0:0")
d2=now
window.divtime.innerHTML="现在距离2005年1月1日0时0分0秒还有 <font color=red><b>" & clng((cdbl(d1)-cdbl(d2))*24*60*60) & "</b></font>秒"
end sub
</script>
</body>
</html>
smallyear
2004-08-03
打赏
举报
回复
不知道有什么分別﹐只是賦值對象不同而已
wsdzmhongm
2004-08-03
打赏
举报
回复
<span>
flash和javascript
倒计时
时钟
自己写了一个简单的flash
倒计时
功能,并提供了一个网页进行调用,在网页里设置简单的
倒计时
时间就可以使用了,做网站可能用得到
基于jQuery的3种复古翻牌
时钟
效果,1、
时钟
效果 2、
倒计时
3、10秒
倒计时
(回调函数),兼容主流浏览器
基于jQuery的3种复古翻牌
时钟
效果,1、
时钟
效果 2、
倒计时
3、10秒
倒计时
(回调函数),兼容主流浏览器
倒计时
flash源码
该flash
页面
精美,并且在最后10秒中有音乐提示,最后1面有锣声提示“停”
HTML5 2020年除夕
倒计时
时钟
代码.zip
HTML5 2020年除夕
倒计时
时钟
代码.zip HTML5 2020年除夕
倒计时
时钟
代码.zip HTML5 2020年除夕
倒计时
时钟
代码.zip HTML5 2020年除夕
倒计时
时钟
代码.zip
CSS3
时钟
圆形立体
倒计时
代码.zip
CSS3
时钟
圆形立体
倒计时
代码是一款带阴影的圆形
倒计时
钟代码。
ASP
28,409
社区成员
356,968
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章