Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

If I open a window using

window.open('myurl.html', 'windowname', 'width=100,height=100');

How do I refer to the new window (from the same page that opened it) using 'windowname'? This question is specifically about this. I'm aware that I could save a reference to the handle by using "var mywin = window.open(...)" but I don't care about that in this situation.

Thanks, - Dave

question from:https://stackoverflow.com/questions/7243970/access-a-window-by-window-name

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
62 views
Welcome To Ask or Share your Answers For Others

1 Answer

afaik there's no way like windows['windowname']. The 'windowname' assigned in window.open() can be addressed as a target in <a target="windowname" [...] >


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...