【发布时间】:2014-03-29 12:22:24
【问题描述】:
我试过这个,但用户需要点击两次返回按钮,一次更改返回哈希值,另一次返回 iframe 内容:
(打字稿)
this.iframeApp.load(() => {
if (this.sameDomain()) {
window.location.hash = this.iframeApp[0].contentWindow.location.toString();
} else {
window.location.hash = this.iframeApp.prop('src');
}
});
一开始:
var url = window.location.hash;
if (url.length > 1) {
url = url.substring(1);
} else {
url = this.settings.default;
}
this.openPage(url);
我认为 History Api 无济于事。我需要在 IE9 上运行的东西
【问题讨论】:
标签: javascript browser browser-history html5-history