window.open与目标" _blank"在Chrome [英] window.open with target "_blank" in Chrome
问题描述
我有一个新的选项卡中打开一个URL一个小javascript函数:
I have a small javascript function which opens an url in a new tab:
function RedirectToPage(status) {
var url = 'ObjectEditor.aspx?Status=' + status;
window.open(url , '_blank');
}
通过点击一个按钮,称为客户端时,这总是有效,即使在镀铬。
但在Chrome不会使用正常工作时,它从服务器端(!)名为
This always works when called client-side by clicking a button, even in chrome. But in Chrome it won't work when it's called from server-side(!) by using
ScriptManager.RegisterClientScriptBlock()
在Firefox和IE它打开一个新标签的URL,而Chrome在打开一个新窗口的URL。什么可能是一个解决办法来强制的Chrome新标签中打开它?
In Firefox and IE it opens the url in a new tab, but chrome opens the url in a new window. What could be a workaround to force Chrome to open it in a new tab?
推荐答案
这是在Chrome浏览器的设置。你无法控制如何在浏览器间$ P $点目标 _blank
。
It's a setting in chrome. You can't control how the browser interprets the target _blank
.
这篇关于window.open与目标" _blank"在Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!