001*_*001 4 javascript c# asp.net ajax
你怎么做倒计时器?
当用户加载页面时,时钟开始倒计时,到达时间,它将浏览器重定向到新页面.
发现这一点,它没有太大用处. http://encosia.com/2007/07/25/display-data-updates-in-real-time-with-ajax/
rob*_*rob 10
像这样的东西?
<div id="countDiv"></div>
<script>
function countDown (count) {
if (count > 0) {
var d = document.getElementById("countDiv");
d.innerHTML = count;
setTimeout (function() { countDown(count-1); }, 1000);
}
else
document.location = "someotherpage.html";
}
countDown(5);
</script>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3010 次 |
| 最近记录: |