请教高手:php团购倒计时怎么做??
不同的商品显示不同的倒计时,团购开始时间和结束时间可以动态设置??请高手指点,谢谢!!!
------解决方案--------------------
结束时间是固定的,再用JS倒计时呗
------解决方案--------------------
往HTML 输出确定的时间,然后 用JS做倒计时。。我这有个倒计时的。。。
我这个是跳转网页的。。大概思路你看看吧
<script type="text/javascript">
<!--
function go(t,url){
//t设置跳转时间:秒
//url设置跳转网址
document.write("<div id=text>本页将在<strong id=tt>后,跳转至:<span id=link>");
document.getElementById("link").innerHTML="<a href="+url+">"+url+"";
$(t,url);
}
function $(t,url){
ta = t-1;
tb = t+"000";
d = document.getElementById("tt");
d.innerHTML=t;
window.setInterval(function()
{
go_to(url);
},1000);
}
function go_to(url){
d.innerHTML=ta--;
if(ta<0){
document.write("正在跳转至:<a href="+url+">"+url+"");
location.href=url;
}
else{
return;
}
}
//-->
</script><script type="text/javascript">
go(5,"s.php")
</script><div class="clear"></div>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号