开发者

window.location.href in firefox [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, inco开发者_StackOverflow中文版mplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

Can you please tell me why window.location.href is not working on firefox?

Code:

<script>

     function goToURL() {
           window.location.href('url');
     }

</script>

What can I use instead of window.location.href as an alternative?


This should work in both IE and FireFox:

window.location.assign(url);


You use it for example like this:

window.location.href = 'http://www.guffa.com';

I have verified that this code works in Firefox 3.6.12.

If that doesn't work for you, you have to be more specific in your question about what the exact problem is.


Here is answere for You:

windows.location.href not working on Firefox3


use it with an assignment

window.location = "http://...";

anyway you should be more specific in your question

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜