window.location.href in firefox [closed]
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
精彩评论