页面跳转问题,请大家指教,谢谢,在线等~~~~
现有一个框架页面,上下2个分别为
<frame src= "first.jsp " name= "topFrame ">
<frame src= "err.jsp " name= "midFrame ">
当我执行到以下步骤时:
out.print( " <script> alert( '出错! ');document.location= 'first.jsp </script> ");上面的topFrame框架页面能正确跳转到first.jsp;我希望下面的midFrame框架页面也能跳转到err.jsp
我写成:
out.print( " <script> alert( '出错! ');document.location= 'first.jsp </script> ");
out.print( " <script> window.location.target=midFrame;window.location.href= 'err.jsp '; </script> ");
不能实现预期效果,谢谢指教;
------解决方案--------------------JSP也来这里问啦,哈哈,NET版人气好高啊。
try:
out.print( " <script> alert( '出错! ');document.location= 'first.jsp ';document.location= 'first.jsp ';top.midFrame.location= 'err.jsp '; </script> ");
------解决方案--------------------window.location.target=midFrame?没有见过这样的写法
out.print( " <script> alert( '出错! ');document.location= 'first.jsp </script> ");
out.print( " <script> parent.frames[ 'midFrame '].location.href= 'err.jsp '; </script> ");