在IE9中使用HTML5 pushState() [英] Using HTML5 pushState() in IE9

查看:325
本文介绍了在IE9中使用HTML5 pushState()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IE9中有没有办法使用HTML5 History API( pushState )?
如果所有其他浏览器都有解决方案,那就太好了!

Is there any way to use HTML5 History API (pushState) in IE9? If there is a solution for all other browsers that would be great!

推荐答案

History.js

引用回购:


History.js优雅地支持所有浏览器中的HTML5历史/状态API(pushState,replaceState,onPopState)。包括对数据,标题,替换状态的持续支持。支持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.

这篇关于在IE9中使用HTML5 pushState()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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