貌似...遇到过~~
你把script放到input上面去看看
有没有可能使这个原因~~~

解决方案 »

  1.   

    <a href = "out.jsp">退出</a>
    //out.jsp
    <%
    session.removeAttribute("right");
    response.sendRedirect("index.jsp");
    %>
      

  2.   

    onclick="tc();" 
    <script LANGUAGE="JavaScript"〉是你拷错了还是写错了
      

  3.   

    老兄!
    <script LANGUAGE="JavaScript〉
                function tc(){
                    <%
                   session.removeAttribute("right");
                   response.sendRedirect("index.jsp");
           %>
                }
    </script>
    怎么可以?!!
    <%
                   session.removeAttribute("right");
                   response.sendRedirect("index.jsp");
    %>
    还没有生成客户端文件就已经执行了的!!
    你要在执行退出的时候转到一个页面logout.jsp,其中包含
    <%
                   session.removeAttribute("right");
                   response.sendRedirect("index.jsp");
    %>
    就可以!!
      

  4.   

    <input type="button" onclick="window.location.href='tc_log.jsp'" value="退出">
    新建一个退出页面tc_login.jsp
    <%
    String right=(String)session.getAttribute("right");
    session.removeAttribute("right");
    response.sendRedirect("index.jsp");
    %>
      

  5.   

    你漏了引号和〉符号弄错,应该向下面
    <input type="button" name="" onclick="tc()" value="退出"><script LANGUAGE="JavaScript">
                function tc(){
                    <%
                   session.removeAttribute("right");
                   response.sendRedirect("index.jsp");
           %>
                }
    </script>