【发布时间】:2013-12-26 14:53:29
【问题描述】:
当用户单击浏览器返回按钮时,注销浏览器不应允许返回。此功能在 IE、FF 中运行良好,但在 Safari 中无法运行。尝试了很多但无法解决。这是我使用的代码。
$(document).ready(function(){
window.location.hash="";
window.location.hash="";
window.onhashchange=function(){
window.location.hash="";
}
});
【问题讨论】:
-
这似乎是一种奇怪的做法。在某些浏览器中也感觉像是无限递归的情况。在 onhashchange 中更改哈希
标签: javascript jquery safari