讓我...我已經提到這個問題/答案,它似乎包含線索前言本,但我仍然失蹤的全貌iframe中的框架的jQuery/javascript上下文是什麼?
Run JQuery in the context of another frame
本質上,索引頁的結構然後這個
<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
......我還缺少什麼?
也引用了這個,但我太新,不能發佈多個鏈接 http://stackoverflow.com/questions/997986/write-elements-into-a-child-iframe-using-javascript-or- jQuery的 – technicolorenvy 2010-01-27 21:22:38
這個問題可能會幫助你:http://stackoverflow.com/questions/251420/invoking-javascript-in-iframe-from-parent-page(無恥的自我推銷,因爲問題最初是由我問) – 2010-01-27 21:33:50