标题:倒计时
只看楼主
nixy
Rank: 1
等 级:新手上路
帖 子:202
专家分:0
注 册:2006-11-29
结帖率:0
 问题点数:0 回复次数:9 
倒计时
如何让以下代码显示到小时、分、秒?请大虾们帮忙
<%
response.write "距国庆节还有"
response.write "<font color=blue><u>"
response.write DateDiff("d",Date(),"2007-09-27")
response.write "</font></u>"
response.write "天"
%>
搜索更多相关主题的帖子: response 国庆节 倒计时 write 
2007-09-27 08:31
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
得分:0 
<%
response.write "距国庆节还有"
response.write "<font color=blue><u>"
response.write now()
response.write "</font></u>"
response.write "天"
%>

[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2007-09-27 08:37
nixy
Rank: 1
等 级:新手上路
帖 子:202
专家分:0
注 册:2006-11-29
得分:0 

我做的是倒计时,不是时间


2007-09-27 09:01
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
得分:0 
<%
response.write "距国庆节还有 <IMG src=""http://danjo.ca/cgi-sys/Count.cgi?display=countdown&cdt=2007;10;01;00;00;00&sdhms=Y&prgb=green&ft=0"" border=""0"">"
%>

[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2007-09-27 09:07
liujun1314
Rank: 1
等 级:新手上路
帖 子:58
专家分:0
注 册:2007-9-18
得分:0 
<%
response.write "距国庆节还有"
response.write "<font color=blue><u>"
response.write DateDiff("d",Date(),"2007-09-27")
response.write "</font></u>"
response.write " "2007-10-1"-date()"
response.write "天"
response.write"24-hour(date())"
response.write"小时"
response.write" 60-minute(date())"
response.write"分"
response.write"60-second(date())"
response.write"秒"
%>

这样编吧,你可以去运行哈!

2007-09-27 09:50
zsf2006
Rank: 1
来 自:博客园
等 级:新手上路
威 望:1
帖 子:315
专家分:0
注 册:2006-6-3
得分:0 

以下是距2008年北京奥运会倒计时的代码(只供参考)!
http://www.east-xing.cn/bbs/dispbbs.asp?boardID=3&ID=213&page=1

光临我的博客:http://
2007-09-27 10:46
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:0 
[CODE]<html>
<head>
<title>奥运会倒计时</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="vbscript">
Dim NowHour
Dim NowDay
Dim NowSecond
Dim NowMinutes
Function Page_Load()
Window.setTimeout "Page_Load()",10
NowDay=DateDiff("d",Now,"2008-8-8 00:00:00")
NowHour=DateDiff("h",Now,"2008-8-8 00:00:00")
NowMinutes=DateDiff("n",Now,"2008-8-8 00:00:00")
NowSecond=DateDiff("s",Now,"2008-8-8 00:00:00")
document.all("ShowInfo").innerHTML="距离奥运会开幕还有"&NowDay&"天"&NowHour&"小时"&NowMinutes&"分钟"&NowSecond&"秒"
End Function
</script>
</head>
<body onload="Page_Load()">
<div id="ShowInfo"></div>
</body>
</html>[/CODE]
以前写的楼主看看
2007-09-27 14:53
skylence
Rank: 1
等 级:新手上路
帖 子:92
专家分:0
注 册:2006-11-15
得分:0 

呵呵 不错呀
看看


2007-09-27 18:43
天涯听雨
Rank: 2
来 自:东莞
等 级:论坛游民
威 望:4
帖 子:497
专家分:64
注 册:2007-8-25
得分:0 

一个动态的北京倒计时JS程序:(摘自TX网站)

<script>
var now = new Date();
function createtime(){

var grt= new Date("8/08/2008 20:00:00");

now.setTime(now.getTime()+250);
days = (grt - now) / 1000 / 60 / 60 / 24;
dnum = Math.floor(days);
hours = (grt - now) / 1000 / 60 / 60 - (24 * dnum);
hnum = Math.floor(hours);
if(String(hnum).length ==1 ){hnum = "0" + hnum;}
minutes = (grt - now) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
mnum = Math.floor(minutes);
if(String(mnum).length ==1 ){mnum = "0" + mnum;}
seconds = (grt - now) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
snum = Math.round(seconds);
if(String(snum).length ==1 ){snum = "0" + snum;}

document.getElementById("timeDate").innerText = dnum+"天";
document.getElementById("times").innerText = hnum + ":" + mnum + ":" + snum;
}
setInterval("createtime()",250);
</script>

<table width="170" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="24" colspan="2" style="Font-size:12px;padding-top:5px">距08年8月8日 奥运会开幕还有</td>
</tr>
<tr>
<td align="center" class="fb" id="timeDate" style="Font-size:14px;Font-weight:bold"></td>
<td align="center" class="fb" id="times" style="Font-size:14px;Font-weight:bold"></td>
</tr>
</table>


从明天起做幸福的人,喂马劈柴周游世界!
2007-09-27 20:41
zsf2006
Rank: 1
来 自:博客园
等 级:新手上路
威 望:1
帖 子:315
专家分:0
注 册:2006-6-3
得分:0 
9楼的结果和我一样,呵呵...

光临我的博客:http://
2007-09-28 09:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-173194-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019416 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved