-1
登录后,如果我点击浏览器的按钮,然后我想通过将它指向使用jquery的php页面来销毁会话。如何使用jquery点击浏览器的后退按钮来销毁会话
这是我的jquery代码,它适用于Mozilla。但不能在chrome上工作。我想要独立于浏览器。
在此先感谢。
<script>
$(document).ready(function(){
if (typeof history.pushState === "function") {
history.pushState("bbs", null, null);
window.onpopstate = function() {
history.pushState('newbbs', null, null);
};
$(location).attr('href','backbuttonsessiondeactivation.php');
}
});
</script>
这里是我的backbuttonsessiondeactivation.php内容:
<?php
session_start();
extract($_REQUEST);
session_destroy();
header("Location:login.php");
?>
我怎么能做到这一点?
http://stackoverflow.com/questions/13098802/remove-session-with-jquery – caramba 2014-10-28 13:12:56