开发者

Why doesn't this JavaScript run in Firefox?

开发者 https://www.devze.com 2022-12-12 15:56 出处:网络
It certainly runs on IE6. Why doesn\'t this JavaScript run in Mozilla Firefox? <html> <head>

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

alt text http://support.mozilla.com/img/wiki_up/86c0e1094489ddd5611008de57d0afed-1249166734-294-5.png

Check here for more information + images: FF Pop-up blocker


Why doesn't this JavaScript run in Firefox?

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.

0

精彩评论

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