<html> <body bgcolor=lightcyan text=red><h1> <font color=blue> demo </font> </h1> <p> </br><p> waiting three sec!<script>var timerrvar flag=0function stopGoal(){window.clearTimeout(timerr);//alert("clearTimeout");ajaxGetData();//setTime();}function setTime(){flag=flag+1timerr=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分钟刷新一次。
添加回答
举报
0/150
提交
取消