Javascript 使用History.js时接收错误
我将在我的web应用程序中实现,作为解决Internet Explorer中缺少对Javascript 使用History.js时接收错误,javascript,jquery,internet-explorer,internet-explorer-9,history.js,Javascript,Jquery,Internet Explorer,Internet Explorer 9,History.js,我将在我的web应用程序中实现,作为解决Internet Explorer中缺少对history.pushState()支持的一个解决办法 到目前为止,在以下演示和教程中,我编写了以下代码: var historyJs = window.History; historyJs.Adapter.bind(window, 'statechange', function () { var State = History.getState(); historyJs.log(State
history.pushState()
支持的一个解决办法
到目前为止,在以下演示和教程中,我编写了以下代码:
var historyJs = window.History;
historyJs.Adapter.bind(window, 'statechange', function () {
var State = History.getState();
historyJs.log(State.data, State.title, State.url);
});
但是,在Internet Explorer 9中返回了以下错误:
SCRIPT5007:应为对象
jquery.history.js,第1行,字符3154
为什么我会收到此错误?听起来您缺少对jQuery的引用
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
你找到导致错误的原因了吗?@barry还没有,还在寻找解决方案