爱情故事情感网

www.88mylove.com

注册 / 登录

感人文章

爱情故事

情感文章

伤感日志

网络日记

12星座

好文章

家常菜

许愿祝福

热门搜索

当前位置: 爱情故事情感网 -> 妙招大全 -> 网页团购商品倒计时代码

网页团购商品倒计时代码

访问数:1604次 作者谁是你 发表日期:2013-05-29 11:52:09

<!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=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><a href="">立即抢购</a>

</div>

<SCRIPT LANGUAGE="JavaScript">

function fresh(){

var endtime=new Date("2013/06/29,10:56:12");

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>


 

0    0

上一篇:pop发送邮件服务器fsockopen函数打开失败如何设置
下一篇:无
以下内容为爱情故事情感网妙招大全网页团购商品倒计时代码的评论与回复
回复此贴:
用户协议:不欺诈 不虚假 不违法 不发表攻击言论 不损人利己
爱情故事情感网-最感人的文章-最感人的爱情故事-好文章-情感故事-最新经典伤感日志大全
© 2007-2024 www.88mylove.com >>  Email:770111722@qq.com
辽ICP备08005173号