js怎么定时刷新指定页面?
将<metahttp-equiv=\\\"refresh\\\"content=\\\"20\\\">添加到head中,content=\\\"20\\\"指每隔20秒刷新一次页面. 也可以用下面的JS控制 <scriptlanguage=\\\"JavaScript\\\"> functionmyrefresh(){ window.location.reload(); } setTimeout(\\\'myrefresh()\\\',1000);//指定1秒刷新一次 </script> 或者是 functionrefresh() { window.location.href=\\\"当前页面URL\\\"; setTimeout(\\\"refresh()\\\",10000); }
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有