English 中文(简体)
页: 1
原标题:Google Chrome "window.open" workaround?

我一直在网上浏览,我需要打开一个新窗口。 我在所有浏览器上工作,我的贴切点是谷歌。

Chrome似乎忽视了造成我问题的窗口特征,我所挣扎的是,在新窗口中,我需要把地址放在一边。 FF、IE、Safat和Ros公司做了这一罚款,没有。

我的法典:

function popitup(url) {
  newwindow=window.open(url,  name ,  toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=1,resizable=1,width=800,height=600 );
  if (window.focus) {
    newwindow.focus()
  }
  return false;
}
问题回答

其他答案已经过时。 Chrome(window. open的行为取决于从何处要求。 另见。 专题

window. open/code>是从用户行动(例如,立克事件)启动的手稿中传唤的,其行为将类似于<代码><a Target=“_blank”>,因违约而打开新表格。 但是,如果有人在别处打上<条码>, Chrome无视其他论点,总是打开一个有不可编辑地址的窗口。

这看起来像某种安全措施,尽管其理由并不完全清楚。

这为我工作:

newwindow = window.open(url, "_blank", "resizable=yes, scrollbars=yes, titlebar=yes, width=800, height=900, top=10, left=10");

<代码> 所在地=1部分应可形成一个可沉积的位置条码。

作为附带说明,你可以放弃“<代码>语言=“javascript”的属性,因为它现在被删除。

www.un.org/Depts/DGACM/index_spanish.htm

订立正确的参数<条码> > 我的工作

谷歌 Chrome在新窗口而不是制片时,决不能或 0。

我认为,目前没有任何强迫神.作为制片的新窗口的 j。 所提交的机票载于以下网站:http://code.google.com/p/chromium/issues/detail?id=5348“rel=“nofollow noreferer”>。 显示以违约表示的征象:。 但是,用户可以点击左上角的hr子,选择“S作为制片”地址,然后该地址便变成了沉积。

https://stackoverflow.com/questions/726761/javascript- open-in-a-new-window-not-tab”javascript 打开新窗口,不铺设

就我所知,如果你提到当地东道方,神学院就没有适当工作(例如,你在当地重建一个场所)。

这项工作:

var windowObjectReference;
var strWindowFeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";

function openRequestedPopup() {
  windowObjectReference = window.open("http://www.cnn.com/", "CNN_WindowName", strWindowFeatures);
}

这并不可行

var windowObjectReference;
var strWindowFeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";

function openRequestedPopup() {
  windowObjectReference = window.open("http://localhost/webappFolder/MapViewer.do", "CNN_WindowName", strWindowFeatures);
}

在从上装载时,这也不可行。

var windowObjectReference;
var strWindowFeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";

function openRequestedPopup() {
  windowObjectReference = window.open("/webappFolder/MapViewer.do", "CNN_WindowName", strWindowFeatures);
}

Don t在你使用窗户时为目标窗口贴上名字。

如果你这样做,你只能开张。 使用——空白,等等。

Why is this still so complicated in 2021? For me I wanted to open in a new chrome window fullscreen so I used the below:

window.open("http://my.url.com", "", "fullscreen=yes");

这样做是为了预先设定一个新的神学院窗口。 如果没有最终的选择,它只会打开一个新的表格。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签