倒计时间表
来源:互联网 发布:恒大淘宝股权 编辑:程序博客网 时间:2024/05/01 23:15
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<!-- saved from url=(0022)http://blog.csdn.net/electroniXtar/ -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>倒计时间表</title>
<style type="text/css">
*{margin:0;padding:0;}
#content{width:300px;margin:0 auto;padding:10px;background:#eee;border:1px solid #999;}
#content p span{color:red;font:bold 20px Arial;}
#content p a{font:12px/23px '宋体';color:#888;}
.div1{ display:none;}
</style>
</head>
<body><div id="content">
<h1>倒计时</h1>
<p>还剩<span id="times"></span></p>
</div>
<SCRIPT LANGUAGE="JavaScript">
function fresh()
{
var endtime=new Date("2012/01/01,00:00:00");//定义到达时间;
var nowtime = new Date();
var leftsecond=parseInt((endtime.getTime()-nowtime.getTime())/1000);
D=parseInt(leftsecond/3600/24);
h=parseInt((leftsecond/3600)%24);
m=parseInt((leftsecond/60)%60);
s=parseInt(leftsecond%60);
document.getElementById("times").innerHTML=D+"日"+h+"小时"+m+"分"+s+"秒";
if(leftsecond<=0){
document.getElementById("times").innerHTML="时间到达";
clearInterval(sh);
}
}
fresh()
var sh;
sh=setInterval(fresh,1000);
</SCRIPT>
</body>
</html>
- 倒计时间表
- 倒计开始
- 倒 计 时 代 码
- 【UI设计】time倒计
- js计数器:天时分秒的倒计
- 可调整倒计时间的JS代码
- 文本框输入文字倒计代码实例
- 时间表
- 时间表
- 时间表
- 倒
- 倒*
- 页面操作完成时,显示提示信息并倒计N秒后跳转
- 页面操作完成时,显示提示信息并倒计N秒后跳转
- 倒倒
- 世界杯时间表
- 身体时间表
- 喝水时间表
- jquery 实现ajax
- QT Linguist用法(国际化)
- 字符串倒序反转程序
- x86_64要注意的问题
- 《GOF设计模式》—解释器 (INTERPRETER)—Delphi源码示例:字符串搜索
- 倒计时间表
- JSP取得内置对象
- 1. 改良程序的11个技巧
- 《GOF设计模式》—解释器 (INTERPRETER)—Delphi源码示例:对布尔表达式进行操作和求值
- 日历显示
- 多服务器的日志合并统计——apache日志的cronolog轮循
- 书中的一个对象的例子,和.h的分开写类似
- 颜色拾取
- 年终考评以后