简体   繁体   English

使用javascript在IE浏览器的新标签页中打开URL的最佳方法是什么?

[英]What is best way to open URL in new tab in IE browser using javascript?

My requirement is to open URL in new tab in IE browser using javascript. 我的要求是使用javascript在IE浏览器的新标签页中打开URL。 Could you please suggest me the best way. 你能建议我最好的方法吗? I wrote following code , but it did not open redirectUrl in new tab in IE browser. 我写了以下代码,但是它没有在IE浏览器的新标签页中打开redirectUrl。

window.open(redirectUrl, '_newtab'); window.open(redirectUrl,'_newtab');

window.open() works different in each browser. window.open()在每种浏览器中的工作原理都不同。 in Chrome, it will open in a new tab, in IE (11) users need to define if it open in a new window or a new tab in settings, basically there is no way to use window.open to force IE to open in a certain way by javascript. 在Chrome中,它将在新标签页中打开;在IE(11)中,用户需要定义是在新窗口中打开还是在设置中使用新标签页,基本上没有办法使用window.open强制IE在其中打开用javascript的某种方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM