如果你是固定每5秒就刷新一次,可以直接在
<head>
</head>
直接加一个
<meta http-equiv="refresh" content="5">
<head>
</head>
直接加一个
<meta http-equiv="refresh" content="5">
解决方案 »
- ckeditor编辑框如何获取焦点?
- jquery左右移动火狐正常不IE不正常请教
- 根域无法写入cookie
- IE7中的return false;无效
- 为什么通过变量传到click事件中的值会被覆盖呢?
- 怎么用JS给视频文件播放地址赋值啊
- 如何判断<input name="file" type="file" id="file" style="width:400px" value="">的值为空?
- 请问如何在用window.createPopup()创建的窗体中打开链接?
- 请教
- 为什么不能改变table的bordercolor??详情请进--〉
- 请问javaScript有没有专门的IDE开发工具之类,就像VS2003这样的有智能提示或者帮助很详细的
- 求一个正则
***********************************
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
index
</title>
</head>
<body bgcolor="#ffffff"><script language="JavaScript">
function timer(){
//redirect to another page
var TmpStr = "../test/test.jsp";
var ret =window.showModalDialog(TmpStr,null,"status:no;dialogTop:"+(window.screen.height/2-50)); if(ret.status==1){
document.write("<A href="+ret.value+">搜狐</A>");
document.location.reload();
}
if(ret.status==0){
document.write("<A href="+ret.value+">新浪</A>");
document.location.reload();
}
setTimeout(timer,5000);}timer();</script></body>
</html>
var TmpStr = "../test/test.jsp?temp="+ Math.random(); //阻止客户端的缓存2. test.jsp:
//禁用客户端缓存
HTML
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Mon, 23 Jan 1978 12:52:30 GMT">
JSP
response.setHeader("Pragma","No-Cache");
response.setHeader("Cache-Control","No-Cache");
response.setDateHeader("Expires", 0);