命令location.href的IE版本是什么? [英] What is the right IE version for command location.href?

查看:153
本文介绍了命令location.href的IE版本是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在使用location.href(" ProductL.htm")javascript

代码时遇到问题。在我的系统上使用此代码(W98 SE,IE 6.0)正常工作



但是如果用户拥有W2000 IE 5.0则无法正常工作。使用此代码

时,浏览器会在状态栏的页面上显示错误。如果我点击

状态栏找出导致错误的原因我看到这个描述

''此对象的属性不支持''(我用

用英文翻译了这个,我的IE浏览器是荷兰语的。


location.href是否仅适用于某个版本的IE?


问候

Hi

I have a problem using the location.href("ProductL.htm") javascript
code. Using this code on my system ( W98 SE, IE 6.0) is working
correctly.
But if a user has W2000 IE 5.0 it doesn''t work. When using this code
the browser shows an error on page in the statusbar. If I click on the
statusbar to find out what is causing the error I see this description
''The property of this method is not supported by this object'' ( I have
translated this in English, my IE browser is in dutch)

Does the location.href only work for a certain version of IE?

Regards

推荐答案



Jerry Manner写道:

Jerry Manner wrote:
我在使用location.href(" ProductL.htm")javascript
代码时出现问题。
I have a problem using the location.href("ProductL.htm") javascript
code.




尝试分配给该属性,例如

location.href =" ProductL.htm"

您的代码看起来像是一个函数调用。


-


Martin Honnen
http://javaScript.FAQTs.com/





我试过你所说的,但这给了我相同的结果。

location.href只适用于某个版本的IE吗?

Hi

I have tried what you said, but that gave me the same result. Is
location.href only working for a certain version of IE?


Jerry Manner说:
Jerry Manner said:

你好

我已经尝试过你所说的,但这给了我同样的结果。是否
location.href仅适用于某个版本的IE?

Hi

I have tried what you said, but that gave me the same result. Is
location.href only working for a certain version of IE?




不,它适用于所有版本。发布*正好*您正在尝试的内容。



No, it works in all versions. Post *exactly* what you are trying.


这篇关于命令location.href的IE版本是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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