在IE中模拟/ polyfill history.pushstate() [英] Emulate/polyfill history.pushstate() in IE

查看:267
本文介绍了在IE中模拟/ polyfill history.pushstate()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

history.pushstate()。在IE中还有另一种方法可以实现吗?

history.pushstate() is not supported in IE. Is there another way to achieve this in IE?

推荐答案

考虑使用或改编 History.js 。根据描述:

Consider using or adapting History.js from GitHub. As per the description:


History.js优雅地支持
HTML5历史/状态API(pushState,
replaceState ,所有
浏览器中的onPopState)。包括对数据,标题,replaceState的持续支持

支持jQuery,MooTools和
Prototype。对于HTML5浏览器,这个
意味着您可以直接修改URL
,而无需再使用
哈希值。对于HTML4浏览器,
将恢复使用旧的
onhashchange功能。

History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. Including continued support for data, titles, replaceState. Supports jQuery, MooTools and Prototype. For HTML5 browsers this means that you can modify the URL directly, without needing to use hashes anymore. For HTML4 browsers it will revert back to using the old onhashchange functionality.

IE(upto and including 9),不支持pushstate()。 IE 10支持它。

IE (upto and including 9), does not support pushstate(). IE 10 supports it.

http:// caniuse .com / #search = pushstate

这篇关于在IE中模拟/ polyfill history.pushstate()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆