IE中的window.location问题 [英] window.location Problem in IE
本文介绍了IE中的window.location问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个简单的代码,可以在每个浏览器中正常工作,但不能在IE(每个版本)中使用.
I have this simple code that is working fine in every browser, but NOT in IE (every version).
window.setTimeout('window.location = \"http://www.domain/modules/yobilab/copyright/classes/GO_overview.php?refNumb=".$RefNumb."\"', 3000);
return false;
在每个浏览器中,它将转到正确的链接
In every browser it will go to the right link
相反,在IE中,它还包括它来自的链接,因此它将变成这样:
In IE instead it includes also the Link where it comes from, so it will become something like this:
http://www.domain/PAGEWHEREIWAS/modules/yobilab/copyright/classes/GO_overview.php?refNumb=something
为什么这样做?
它显然会产生一个NOT FOUND错误.
It generates a NOT FOUND error obviously.
推荐答案
尝试使用document.location
而不是window.location
.
这篇关于IE中的window.location问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文