How to get the references of all already opened child windows

前端 未结 4 804
春和景丽
春和景丽 2020-11-30 03:31

I want to get the references of all already opened child windows. is there any way? I am not using child = window.open(....) just using window.open(....)<

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 03:58

    I don't believe you can, unless you know the windows' names, which I'm guessing you don't. (If you know their names, you can use window.open("", "name") to get a reference to them.)

    The better option is, of course, to remember the reference returned from window.open in the first place — but you know that. :-)

提交回复
热议问题