为什么在IE8中出现“无效参数”错误? (window.open)

时间:2011-07-12 05:32:25

标签: javascript html css templates

            function popupLink(link){                
               var popup = window.open(link,'Facebook Share','menubar=0,directories=0,toolbar=0,resizable=1,status=0,location=0,width=500,height=350');
                if(!popup){
                    return true;
                }else{                    
                    return false;
                }
            };

 popupLink('http://www.facebook.com/sharer.php?u=http%3A%2F%2Fmsn.com%2F');

我只想弹出一个链接...

1 个答案:

答案 0 :(得分:8)

窗口名称不能在IE中包含空格。将'Facebook Share'更改为'FacebookShare'