在新窗口中打开链接(而不是选项卡) [英] Open Link in a New Window (Rather Than a Tab)

查看:92
本文介绍了在新窗口中打开链接(而不是选项卡)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将目标属性用作target="_blank"时,它将在新的tab中而不是新的window中打开.如何在Firefox 5中的新窗口中打开链接?

无效的新方法:

 <   a     href   ="   href   ="span>   目标  ="  _ blank" 标题  帮助和常见问题解答" önclick   openWindow(this.href,500,600,'Yes'); return false" > 这是我的代码行<  >  

window.open 打开URL.请参见此处.


When I use the target attribute as target="_blank", it is opening in a new tab instead of a new window. How can I open a link in a new window in Firefox 5?

EDIT: New approach, which is not working:

<a href="faqs.html" target="_blank" title="Help &amp; FAQs" önclick="openWindow(this.href,500,600,'Yes');return false">this is my line of code</a>

解决方案

That is user-configurable, so may open in a new tab on your computer but may open in a new window on another user''s computer. You should be able to get around this using JavaScript. Create a click handler for the link and, instead of navigating to the URL, use window.open to open the URL. See here.


这篇关于在新窗口中打开链接(而不是选项卡)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆