1.采用javascript
<input type="button" value="关闭窗口" οnclick="javascript:window.close()">
或者:
<input type="button" value="关闭窗口" οnclick="window.close()">
<input type="button" value="关闭窗口" οnclick="java:window.close()">
2.采用HttpSession 清空session, 退出当前登录.
<a href="logout.jsp" class="a1">退出</a>
logout.jsp 主要代码:
<%
session.invalidate();
response.sendRedirect("index.jsp");
%>
返回到index.jsp