Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

<input type="button" value="Back" onClick="window.navigate('http://www.google.com')">

This works on IE8, but not firefox or opera. Anyone know why and how to fix it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
319 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you check the documentation for that method, you will see the quite common:

There is no public standard that applies to this method.

This means that it's a non-standard feature that most likely only works in Internet Explorer.

This will work:

<input type="button" value="Back" onclick="window.location.href='http://www.google.com';">

If you are using XHTML:

<input type="button" value="Back" onclick="window.location.href='http://www.google.com';" />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...