本文介绍了按窗口名称访问窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我使用
window.open('myurl.html', 'windowname', 'width=100,height=100');
如何使用'windowname'引用新窗口(从打开它的同一页面) ?这个问题具体是关于这一点的。我知道我可以通过使用var mywin = window.open(...)保存对句柄的引用,但在这种情况下我并不关心。
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.
谢谢, - 戴夫
推荐答案
afaik没有办法像 windows ['windowname' ]
。
window.open()中指定的'windowname'可以作为中的目标进行处理< a target =windowname[...]>
afaik there's no way like windows['windowname']
.The 'windowname' assigned in window.open() can be addressed as a target in <a target="windowname" [...] >
这篇关于按窗口名称访问窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!