【发布时间】:2014-09-27 01:14:11
【问题描述】:
我目前(很高兴)使用 jquery 将 ajax 请求函数绑定到非 IE 浏览器中的 window.onpopstate 事件。但是,IE 从未访问过我的 doAjax 函数。
// Bind a function to the popstate event to execute ajax requests
// this allows request to occur on back/fwd browser navigation
window.onpopstate = doAjax;
任何人都知道是否有办法让 IE 8/9 以某种方式运行良好?
【问题讨论】:
-
我认为
pushState或replaceState函数可以触发此事件。你预计 IE 什么时候会触发这个事件? -
pushState/onpopstate在 IE -
@Václav:我正在使用 History jquery 库来更新新 ajax 页面加载时的 url。我的目标是在 url 更改时触发 ajax 页面加载事件,以便用户在单击后退按钮时可以返回到上一个 ajax '页面'。
标签: internet-explorer browser-history