JSPを元の窓口に提出する
A.jspとB.jspの2ページがあり、 A.jspにはコミット操作があり、B.jspはコミット操作のActionであり、
A.jspページに を付け、 IE 6.0では、A.jspのウィンドウの内容がB.jspとなり、A.jspの内容が上書きするが、IE 7.0では新しいウィンドウがポップアップする.
どのようにA.jspが提出した後に新しいウィンドウを弾き出さないことをやり遂げますか?そしてA.jspの内容は変わりませんか?ここにはいくつかの簡単な方法があります.
一.A.jspページで実現
A.jsp
A.jspページに
どのようにA.jspが提出した後に新しいウィンドウを弾き出さないことをやり遂げますか?そしてA.jspの内容は変わりませんか?ここにはいくつかの簡単な方法があります.
一.A.jspページで実現
A.jsp
<form name="form1" method="post" target="submit2Here" action="B.jsp">
//your html code
</form>
<iframe name="submit2Here" style='display:none'></iframe>
B.jsp submit2Here iframe
B.jsp JS ,
window.parent A.jsp window;
window.parent.document A.jsp document;
window.parent.Afunction() A.jsp JS Afunction;
JS A.jsp
. C.jsp
C.jsp
<iframe name="submitPage"
src="A.jsp"
width="900" height="630" frameborder="no" border="0" marginwidth="0" marginheight="0" allowtransparency="yes" ></iframe>
<iframe name="submit2Here" style='display:none'></iframe>
A.jsp
<form name="form1" method="post" target="submit2Here" action="B.jsp">
//your html code
</form>
B.jsp C.jsp submit2Here iframe
B.jsp JS ,
window.parent.document.frames['submitPage'].contentWindow A.jsp window;
alert(window.parent.document.frames['submitPage'].contentWindow.name);
alert(window.parent.document.frames[0].contentWindow.name);
window.parent.document.frames['submitPage'].contentWindow.document A.jsp document;
window.parent.document.frames['submitPage'].contentWindow.Afunction() A.jsp JS Afunction;
JS A.jsp
contentWindow , IE, FireFox .