2013-02-22 52 views
-2

我使用下面的代码打开一个新的没有导航工具栏的弹出窗口。但它在导航工具栏中打开。请帮我解决我的问题。Window.open没有导航工具栏

<script type="text/javascript"> 
function loadUrl1(newLocation) 
{ 
myRef = window.open('newLocation','mywin', 
'left=20,top=20,width=500,height=500,toolbar=0,resizable=0,status=0,location=0,address=0'); 
} 
</script> 

回答

0

弹出脚本:

<script language="javascript" type="text/javascript"> 
    function popitup(url) { 
     newwindow=window.open(url,'name','height=200,width=150'); 
     if (window.focus) {newwindow.focus()} 
     return false; 
    }  
</script> 

然后,通过链接到它:

<a href="popupex.html" onclick="return popitup('popupex.html')">Open popup</a> 

这里是另外一个参考:

http://www.gtalbot.org/BugzillaSection/Bug195867GDR_WindowOpen.html

+0

感谢您的答复。你的代码工作罚款在Firefox中不在即。 – user1951007 2013-02-22 04:39:54

+0

您是否检查过提供的链接,因为它是一个跨浏览器解决方案。 – coder 2013-02-22 04:42:25

+0

是的,但我不能这样做ie.That是为什么我问这个问题。 – user1951007 2013-02-22 04:45:55