<SCRIPT type="text/javascript">
function exit(){
if (!confirm("您确定要注销吗?")){
return;
}
document.getElementById("form1").action = "login/exitLogin.action";
document.getElementById("form1").submit();
alert('注销成功');
window.top.location = '../login/login.jsp';
}
</SCRIPT>
<form id="form1" name="form1"><a onclick="exit(); return false" href="javascript:">注销</a></form>
点击注销,弹出您确定要注销吗?,按确定则注销并页面链接到登陆页面。
此代码在IE9以及chrome浏览器中正常,但在火狐浏览器中不行。
本身此代码是在frame框架的nav层中,火狐浏览器注销后实现注销功能并此nav层定位到登陆界面,而不是整个页面定位过去。
去掉alert则直接跳转到登录页面,不注销
而去掉alert跟window.top.location = '../login/login.jsp';则可以注销。。
以上我测试后的种种问题,火狐浏览器实在无语。求大神~~