<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<SCRIPT type="text/javascript">
function check() {
<!--
window.history.forward(1);
//window.location.replace(document.URL);
//window.open(document.URL,"_self","",true);
//-->
}
</SCRIPT>
<body>
<a href="./login.jsp" onclick="check()">返回首页</a>
</body>
</html>这样写有用么?
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<SCRIPT type="text/javascript">
function check() {
<!--
window.history.forward(1);
//window.location.replace(document.URL);
//window.open(document.URL,"_self","",true);
//-->
}
</SCRIPT>
<body>
<a href="./login.jsp" onclick="check()">返回首页</a>
</body>
</html>这样写有用么?
如果想返回登录页面的话,<a href="jsp路径或者servlet路径"返回首页 </a>因为有个清空session的问题。这样你可以在指定的页面清空session再跳转,或者在servlet中清空再跳转
window. location.href='index.jsp'
}
要不然是调不到的吧