在新标签中打开网址 [英] Opening url in new tab

查看:127
本文介绍了在新标签中打开网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用javascript打开一个新选项卡。

如何编写它以便在Chrome,Firefox和IE7中运行?

(页面位于相同的域名)

I am trying to open a new tab with javascript.
How to write it so that it would work in chrome, firefox and IE7?
(the pages are on the same domain)

UPD:假设用户使用IE7的默认配置...

UPD: Let's presume that the user uses the default configuration of IE7...

推荐答案

您无法控制浏览器如何处理打开新的弹出窗口/页面。这完全由浏览器处理。如果用户将浏览器设置为在新窗口中打开新页面/弹出窗口,则不能强制自己的页面在标签页中打开。

You cannot control how the browser will handle opening new popups / pages. This is entirely handled by the browser. If the user has set their browser up to open new pages/popups in a new window, you cannot force your own page to open in a tab.

这篇关于在新标签中打开网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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