加上
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">就可以
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">就可以
out.println("top.opener.location.replace('PageA.jsp?stunum=2');")
试试看啊!这么做是行的!
应该可以的~
out.println("<Script language='JavaScript'>");
out.println("top.opener.PageA中的form的名字.action='PageA.jsp?stunum=2';");
out.println("top.opener.PageA中的form的名字.submit()");
out.println("top.opener.focus();");
out.println("window.close();");
out.println("</Script>");如果PageA中本来没有form的话,在PageA中做一个假的
<form name="frm" action='PageA.jsp?stunum=2' method="get">
</form>
PageB中修改完以后用
out.println("<Script language='JavaScript'>");
out.println("top.opener.frm.submit()");
out.println("top.opener.focus();");
out.println("window.close();");
out.println("</Script>");
就可以了发生这个问题的原因,我估计是你的ie版本只有5.0
window.open("page b.jsp","ss","windth=12,....");然后在page B中写入:
opener.location.reload();//page A刷新
opener.focus(); //page A焦点
window.close(); //page B 关闭
response.setHeader("Cache-Control","Max-stale=0");
response.setHeader("Pragma","no-cache");
response.setHeader("Expires","-1");
response.setHeader("Max-age","0");
改为:
out.println("top.opener.location='PageA.jsp?stunum=2&rand=Math.random()';");
试试看
这样可每过5秒钟书刷新一次