It certainly runs on IE6.
Why doesn't this JavaScript run in Mozilla Firefox?
<html>
<head>
<title>JavaScript Popup Example 3</title>
</head>
<SCRIPT language="JavaScript1.2">
function MyClass()
{
this.OpenWindow = function()
{
var r = window.open ('', 'mywindow', 'location=1,status=1,scrollbars=1,width=100,height=100');
r.moveTo(0,0);
r.location.href = 'http://www.google.com';
}
}
</SCRIPT>
<body onload="javascript: new MyClass().OpenWindow()">
<H1>JavaScript Popup Example 3</H1>
</body>
</html>
It runs just fine in my FF. For me the popup blocker is catching it.
Did you notice that little bar just below the tabs selection
Check here for more information + images: FF Pop-up blocker
Just go to the FF menu -> option -> content -> block-pop-up-windows
Uncheck the option, click OK and try reload the page. It should now work fine for you. Also, don't forget to tick the check box again if you worry about security.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.