Open popup from another popup

孤街醉人 提交于 2019-12-10 09:45:36

问题


I am trying to open a popup window from another popup window using window.open method but it is simply opening the second popup in the previous popup window.

Code I am currently using:

win= window.open(Window,"child","top=250,left=310,Width=300,Height=150,Location=no,Scrollbars=no") win.focus(); 

回答1:


Make sure you're using a new name for your second new window. If you provide the same name you'll experience this behavior.

open(URL, windowName[, windowFeatures]) 



回答2:


If you do not care what the name of the window is instead of "child" use "_blank" which will always open in a new window. see W3Schools



来源:https://stackoverflow.com/questions/2101795/open-popup-from-another-popup

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!