获取另一个frame中的元素
Posted hmxs
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了获取另一个frame中的元素相关的知识,希望对你有一定的参考价值。
<frameset cols="12,88" frameborder="no" noresize borders="no" framespacing="0">
<frame name="leftFrame" noresize Borders="no" src="jsp/index/left.jsp" >
<frame name="mainFrame" noresize Borders="no" src="jsp/index/welcome.jsp" >
</frameset>
我在leftFrame中获取mainFrame中的元素"<div id=‘div1‘></div>"的方法是
$(parent.frames["mainFrame"].document).find("#div1");
以上是关于获取另一个frame中的元素的主要内容,如果未能解决你的问题,请参考以下文章