<html> <body bgcolor=lightcyan text=red>
<h1> <font color=blue> demo </font> </h1> <p> </br>
<p> waiting three sec!
<script>
var timerr
var flag=0
function stopGoal()
{
window.clearTimeout(timerr);
//alert("clearTimeout");
ajaxGetData();
//setTime();
}
function setTime()
{
flag=flag+1
timerr=setTimeout(ajaxGetData,1000*60);
console.log(flag);
//console.log(flag);
if(flag>=10)
{
flag=0;
//alert("stopGoal");
//stopGoal();
}
}
function ajaxGetData(x)
{
//alert('sorry wait');
setTime();
//t=setTimeout(ajaxGetData,1000*1);
}
</script>
<script>
ajaxGetData( )
</script>
</body> </html>
目前的做法相当于是 每1分钟刷新一次。
神不在的星期二
慕勒3428872
相关分类