你是另外开了个页面吧?
那样的话

opener.location.href="index.jsp";
 target="_parent";

解决方案 »

  1.   

    <script language="javascript">
    <!--
     alert("登录失败!");
     parent.location.href="index.jsp";
     target="_parent";
    //-->
    </script>
      

  2.   

    top.location.href="index.jsp";
    parent.location.href="index.jsp";
      

  3.   

    <script language="javascript">
    <!--
     alert("登录失败!");
     opener.location.href="index.jsp";
    //-->
    </script>
      

  4.   

    <script language="javascript">
    <!--
     alert("登录失败!");
     window.parent.location.href="index.jsp";
    //-->
    </script>
    or
    <script language="javascript">
    <!--
     alert("登录失败!");
     window.top.location.href="index.jsp";
    //-->
    </script>
      

  5.   

    你要分清父窗口与当前窗口。
    我想你应该是一个页面有两个frame吧,一个在上面,一个在下面吧,(或者一个在左边,一个在右边)
    可以用window.parent.'要显示index的frame'.location.href="index.jsp";