Javascript $(window).bind(';hashchange';,函数()在我的IE9中不起作用
我的网站使用Javascript $(window).bind(';hashchange';,函数()在我的IE9中不起作用,javascript,php,jquery,Javascript,Php,Jquery,我的网站使用$(window.bind('hashchange',function())检查是否需要重定向。但是,我的网站在firefox中运行良好,而不是在IE9中 $(window).bind('hashchange', function () { alert('hash change2'); hash(); }); $(window).load(function() { // Make sure cookies are enabled $
$(window.bind('hashchange',function())
检查是否需要重定向。但是,我的网站在firefox中运行良好,而不是在IE9中
$(window).bind('hashchange', function ()
{
alert('hash change2');
hash();
});
$(window).load(function()
{
// Make sure cookies are enabled
$.cookie(global_cookie_prefix+'_cookies_test', '1');
var test_cookies_cookie = $.cookie(global_cookie_prefix+'_cookies_test');
if(test_cookies_cookie == null)
{
window.location.replace('error.php?error_code=3');
}
else
{
$.cookie(global_cookie_prefix+'_cookies_test', null);
hash();
/*
alert('after hash0');
$(window).bind('hashchange', function ()
{
//alert('hash change');
//alert('hash change1');
hash();
});
*/
}
});
每次我需要刷新整个页面以使页面成功重定向
拜托,有什么想法吗
/*!jQuery v1.7.1 jQuery.com | jQuery.org/license*/我设法找到了解决方案。在doctype html中添加了一行,然后一切正常
<meta http-equiv="X-UA-Compatible" content="IE-edge">
您使用的JQuery版本是什么?2.x版本不再支持IE9。