概述{dede:arclist row=8 titlelen=32 addfields='time' channelid='18′}<li><span><input type="hidden" id="gettime" value="[field:time function='strftime("%b %d %Y %H:%M:%S",@me)'/]" /><input type="hidden" id="gettitle" value="[field:title/]" /><script>function Clock(){var Today=new Date();//var PPQday=new Date(2012,9-1,28); //你想
倒计时的结束日期var PPQday=new Date(document.getElementById('gettime').value); //你想倒计时的结束日期var DayTime = (PPQday.getTime()-Today.getTime())/ 1000 / 60 / 60 /24;var days = parseInt(DayTime);//天var HourTime =(DayTime - days)*24;var hours =parseInt(HourTime);//时var MinutesTime =(HourTime-hours)*60;var minutes = parseInt(MinutesTime);//分var SecondTime =(MinutesTime-minutes)*60;var seconds = parseInt(SecondTime); //秒document.getElementById("PPQTime").innerHTML= "距"+document.getElementById("gettitle").value+"倒计时 "+ days + "天";//+ ForMat(hours)+"小时"+ForMat(minutes)+"分"+ForMat(seconds)+"秒";setTimeout(Clock,1000);}function ForMat(data){if(data<10)return "0"+data;elsereturn data;}</script><div id="PPQTime"></div></span></li>{/dede:arclist}
<div >
{dede:arcList row=8 Titlelen=32 addfIElds='time' channelID='<input type="hIDden" ID="gettime" value="[fIEld:time function=
'<span >strftime("%b %d %Y %H:%M:%s",@me)'<span >/]" /><div ID="PPQTime">
{/dede:arcList}
总结
以上是内存溢出为你收集整理的织梦倒计时全部内容,希望文章能够帮你解决织梦倒计时所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
评论列表(0条)