织梦倒计时

织梦倒计时,第1张

概述{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}

总结

以上是内存溢出为你收集整理的织梦倒计时全部内容,希望文章能够帮你解决织梦倒计时所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/1066501.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存