让我以此作为序言......我已经引用了这个问题/答案,它似乎包含线索,但我仍然错过了整个画面
本质上,索引页的结构是这样的
<html>
<body>
<div class="frames-wrap">
<iframe id="this-iframe" src="location.php">
</iframe>
</div>
</body>
</html>
location.php 然后包含一个框架集(咳咳,不是我的想法......),它有两个框架,像这样设置......
<frameset cols="350,*">
<frame src="search.php" id="frame_search" name="search"/>
<frame src="edit.php" id="frame_edit" name="edit" />
</frameset>
如果我想在索引页面和这些元素之间操作对象,我会怎么做?
我一直认为上下文应该类似于window.parent.frames[0].document
......我还缺少什么?