你试试这个function window.history.back(){
    document.location.reload(); 
}

解决方案 »

  1.   

    不知你登陆时有没记录Session值,若记录了的话,你可以在后退回去的时候,在登陆页面检查Session值,若存在则又重定向到你的登陆成功页面。这个速度很快,应该不会感觉出是先回到登陆页面在后退到登陆成功页面吧。
      

  2.   

    首先明白后退功能是IE浏览器的.后退后读取的是本地记录.
    可以用ajax来控制吧.读取本地记录不从服务器请求,但ajax可以再次请求,如果没有用户信息,就跳转.
      

  3.   

    4楼的说的有点复杂了吧.不需要这么弄吧.直接登陆成功后写入session.在登陆页面代码加入session判断.存在就跳转到登陆成功页面.
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
    + request.getServerName() + ":" + request.getServerPort()
    + path + "/";
            UserSessionInfo userSessionInfo=null;
    if (SessionUtils.getAttribute(request, "UserSession")!=null){
    userSessionInfo =(UserSessionInfo)SessionUtils.getAttribute(request, "UserSession");
            out.println("<script>location.href='"+path+"/succeed.jsp';</script>");
    }
    else{
    out.println("<script>alert('用户未登陆');</script>");
    out.println("<script>location.href='"+path+"/index.jsp';</script>");
    return;
    }
    %>
    SessionUtils这个是我自己写的读session类.lz可以不用自己写.
    如果有什么不对的地方请大家指出.
      

  4.   

    支持
    function window.history.back(){
        document.location.reload(); 
    }
    虽然没试过, 呵呵