子Frame页面取上两级的Frame并改变src??? JSPHTML
程序员文章站
2024-03-16 08:04:46
...
<frameset id="frameset0" cols="13%,*" border="1" framespacing="0" style="height: 100%"> <frame name="leftFrame" src="device_treeForMana.jsp" frameborder="0" border="0" scrolling="no"> <frameset rows="*,30%"> <frame name="main" src="" frameborder="0" border="0" scrolling="no"> <frame name="info" src="info_view.jsp" frameborder="0" border="0" scrolling="no"> </frameset> </frameset>
要在device_treeForMana.jsp 修改 main这个frame的src JS 怎么获取到 main这个对象来改变它的SRC呢?
window.parent.parent.document.getElementById("main"); X