定时的页面提醒window.setInterval
2012-12-12 16:22
288 查看
<script type="text/javascript" language="javascript"> function GetNewTask() { var NewTaskData; var NewHttp = new ActiveXObject("MSXML2.XMLHTTP"); NewHttp.onreadystatechange = function() { if(NewHttp.readyState==4) { if(NewHttp.status==200) { NewTaskData = NewHttp.responseText; if (NewTaskData == "1") { window.open('NewGZRW.aspx', 'PopupWindow', 'width=250,height=150,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,titlebar=no,top=' + (window.screen.height-200) + ',right='+ (window.screen.width) +"'"); } } } } NewHttp.open("POST","GZRWAlert.aspx",true); NewHttp.send(); } window.setInterval("location.reload()",30000); //每五分钟刷一次 window.setInterval(GetNewTask ,12000); //每二分钟执行GetNewTask方法:页面提醒 </script>
相关文章推荐
- jquery setInterval定时刷新页面
- HttpServletResponse setHeader 定时跳转到其他页面(不在当前工程)
- JS:window.setInterval
- window.clearInterval与window.setInterval的用法(
- Js_window.setInterval & window.setTimeout
- js实现的定时关闭页面或定时提醒效果代码
- HttpServletResponse setHeader 定时跳转至当前工程的其他页面
- window.setInterval('domethod()',1860000)
- 使用window.setInterval设置登录前…
- window.setInterval做定时器和使用window.clearInterval()停止定时器
- Js setInterval与setTimeout(定时执行与循环执行)的代码(可以传入参数)
- window.setInterval的用法.
- Js setInterval与setTimeout(定时执行与循环执行)的代码(可以传入参数
- 停止window.setInterval("fs()",1000)
- window.setInterval
- HttpServletResponse setHeader 定时刷新当前页面
- window.setInterval()方法的定义和用法及offsetLeft与style.left的区别
- Js setInterval与setTimeout(定时执行与循环执行)的代码(可以传入参数)
- js-定时任务setInterval,setTimeout,clearInterval,clearTimeout