1、網頁設計如何做倒計時牌
<body>
<div id="timer"></div>
<script type="text/javascript" language="javascript">
var endDate=new Date(2010,11,11,17,05,40);//年月日時分秒,月要減去1
(function JiShi()
{
var now=new Date();
var oft=Math.round((endDate-now)/1000);
var ofd=parseInt(oft/3600/24);
var ofh=parseInt((oft%(3600*24))/3600);
var ofm=parseInt((oft%3600)/60);
var ofs=oft%60;
document.getElementById('timer').innerHTML='還有 '+ofd+' 天 ' +ofh+ ' 小時 ' +ofm+ ' 分鍾 ' +ofs+ ' 秒';
if(ofs<0){document.getElementById('timer').innerHTML='倒計時結束!';return;};
setTimeout('JiShi()',1000);
}());
</script>
</body>
修改成需要的時間段,直接嵌入就可以了~~~祝你愉快!
2、易語言怎麼製作倒計時1年的時鍾?365天倒計時,倒計時一直不停止 關機也不停止
1、將預置時間 轉成 時間戳 並寫進程序(即,在程序中設置成全局變數)
2、連接網路,取網路標准時間的時間戳(不取本地時間,是因為某些原因會導入時間不準確,比如人為手動修改時間)
3、判斷時間差(通過 全局變數的時間戳 - 網路時間戳 = 倒計時的時間戳
4、通過 倒計時的時間戳 轉換成倒數數據(具體的,都是除法)
5、開機啟動(這項可略過,1年內,要是重裝系統,就沒得玩了,所以;可以略過)
6、完成上面的,基本上就已經可以成功完成倒計數;不論你什麼啟動,在網路下都可以准確倒計時
7、最重要的一點,不要問我要源碼,自己寫
3、ASP網頁設計問題,如何製作網頁上的團購倒計時功能?
你好!
不知道問題解決沒有!
我這有段代碼,看看你能用不?
------------------------------------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/JavaScript">
var iTimerID;
function showTime(n){
var d = new Date(n);
var today = new Date();
var millisecond = d.getTime()-today.getTime();
if(millisecond>0){
var s_day = 24*60*60*1000;
var s_hour = 60*60*1000;
var s_minute=60*1000;
var s_second=1000;
var meDay = parseInt(millisecond/s_day);
var meHour= parseInt((millisecond%s_day)/s_hour);
var meMinute=parseInt(((millisecond%s_day)%s_hour)/s_minute);
var meSecond=parseInt((((millisecond%s_day)%s_hour)%s_minute)/s_second);
document.getElementById("nowtime").innerHTML = "團購還剩: " + meDay + " 天 " + meHour + " 小時 " + meMinute +" 分鍾 " + meSecond + " 秒";
iTimerID = window.setTimeout("showTime('"+n+"')",1000);
}else{
if(iTimerID){ window.clearTimeout(iTimerID); }
document.getElementById("nowtime").innerHTML = "團購還剩: 0 天 0 小時 0 分鍾 0 秒 已結束";
}
}
</script>
</head>
<body>
<a href="javascript:showTime('2013-01-28 05:45:25')">團購倒計時</a>
<hr />
<div id="nowtime" style="width:420px;background-color:#FFCCCC"></div>
</body>
</html>
-----------------------------------------------------------------------------------------------
4、怎樣自定義HTML網頁製作倒計時牌?
需要下載這個頁面的JS代碼,並將這個代碼加入到頁面中才能起作用。
5、網頁製作小白,請問如何做個有這樣的效果的小倒計時器
《!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>jQuery計時器插件TimeCircles演示1</title>
<link rel="stylesheet" href="http://www.17sucai.com/preview/22557/2014-11-04/62/css/TimeCircles.css" />
</head>
<body>
<h1 style="margin: 40px; font: 32px Microsoft Yahei; text-align: center;">jQuery計時器插件TimeCircles演示1</h1>
<div class="menu">
<a class="cur" href="http://www.17sucai.com/preview/22557/2014-11-04/62/index.html">演示1(默認+美化)</a>
<a href="http://www.17sucai.com/preview/22557/2014-11-04/62/index_2.html">演示2(帶控制)</a>
</div>
<p style="width: 580px; margin: 0 auto; text-align: center;">離2014年1月1日還有(2014年1月1日已過)</p>
<div id="someTimer1" class="someTimer" data-date="2014-01-01 00:00:00" style="width: 700px; margin: 0 auto;"></div>
<p style="width: 580px; margin: 0 auto; text-align: center;">倒計時65秒後結束</p>
<div id="someTimer2" class="someTimer" data-timer="65" style="width: 700px; margin: 0 auto;"></div>
<p style="width: 580px; margin: 0 auto; text-align: center;">頁面開始時計時</p>
<div id="someTimer3" class="someTimer" style="width: 700px; margin: 0 auto;"></div>
<script src="http://www.17sucai.com/preview/22557/2014-11-04/62/js/jquery-1.7.2.min.js"></script>
<script src="http://www.17sucai.com/preview/22557/2014-11-04/62/js/TimeCircles.js"></script>
<script>
$(function(){
$('#someTimer1').TimeCircles({
time : {
Days: {
show: false,
text: "天",
color: "#FC6"
},
Hours: {
show: false,
text: "時",
color: "#9CF"
},
Minutes: {
show: false,
text: "分",
color: "#BFB"
},
Seconds: {
show: false,
text: "秒",
color: "#F99"
}
}
});
$('#someTimer2').TimeCircles({
time : {
Days: {
show: false,
text: "天",
color: "#FC6"
},
Hours: {
show: false,
text: "時",
color: "#9CF"
},
Minutes: {
show: false,
text: "分",
color: "#BFB"
},
Seconds: {
show: false,
text: "秒",
color: "#F99"
}
},
refresh_interval: 0.1,
count_past_zero: false,
circle_bg_color: "#ddd",
fg_width: 0.03,
bg_width: 0.2
});
$('#someTimer3').TimeCircles({
time : {
Days: {
show: false,
text: "天",
color: "#FC6"
},
Hours: {
show: false,
text: "時",
color: "#9CF"
},
Minutes: {
show: false,
text: "分",
color: "#BFB"
},
Seconds: {
show: false,
text: "秒",
color: "#F99"
}
},
refresh_interval: 0.1,
count_past_zero: true,
circle_bg_color: "#eee",
fg_width: 0.05,
bg_width: 1
});
});
</script>
</body>
</html>
6、我想利用javascript製作一個在網頁右下角出現的浮動窗口,窗口裡面是2分鍾的倒計時,時間一到就轉到另一個
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<script type="text/javascript">
function foo(){
var s=document.getElementById('m').innerHTML;
if(s==0){document.getElementById('d1').style.display='none'; document.getElementById('d2').style.display='block'; return;}
document.getElementById('m').innerHTML=s-1;
t=setTimeout('foo()',1000);
}
</script>
<body onload="foo()">
<div id="d1" style="position:absolute; right:0px; bottom:0px; border:1px solid #666; width:200px; height:100px; background-color:#FFFFBF; display:block;">第一個窗口,<br />倒計時<span id="m">120</span>秒</div>
<div id="d2" style="position:absolute; right:0px; bottom:0px; border:1px solid #666; width:200px; height:100px; background-color:#FFFFBF; display:none;">第二個窗口</div>
</body>
</html>
7、QQ空間裡面能不能設置一些比如倒計時之類的時鍾設計表
操作方法:
1)打開你的QQ空間,點擊「自定義」——「新建模塊」。
2)接著,會彈出一個「網頁對話框」,
模塊類型,選擇「FLASH動畫模塊」,單擊他。
3)又彈出一個「網頁對話框」,
添加標題,填上你喜歡的名字;FLASH動畫地址,請填入FLSAH文件的地址
輸入的FLSAH文件的地址就是我上面給你展示的地址~~
希望被採納~~