简体   繁体   English

用于backbutton和ajax调用的hashchange

[英]hashchange for backbutton and ajax call

Is there a way to seperate a hashchange that occurs after a 有没有办法分离在

window.location.hash = 'x' window.location.hash ='x'

from the one that occurs after clicking the backbutton? 从单击后退按钮后发生的那一个?

Right now, in Internet Explorer 8, Firefox 3.6+, and Chrome 5+, you can bind callbacks to the window.onhashchange event and use it without any kind of plugin. 现在,在Internet Explorer 8,Firefox 3.6+和Chrome 5+中,您可以将回调绑定到window.onhashchange事件,而无需任何插件即可使用它。

For those Browsers does NOT support onhashchange, you can use Jquery plugin http://plugins.jquery.com/project/hashchange 对于那些不支持onhashchange的浏览器,可以使用Jquery插件http://plugins.jquery.com/project/hashchange

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM