【发布时间】:2010-11-03 03:15:36
【问题描述】:
我有这样的事情:
<!doctype html>
<html>
<body>
<iframe id="someFrame"></iframe>
</body>
</html>
我想使用 jQuery 来编写元素,使得完整的等效 HTML 如下所示:
<!doctype html>
<html>
<body>
<iframe id="someFrame">
<!-- inside the iframe's content -->
<!-- <html><body> -->
<div>A</div>
<div>B</div>
<div>C</div>
<!-- </body></html> -->
</iframe>
</body>
</html>
或者,任何普通的旧Javascript都可以。
谢谢。
编辑:经过更多研究,我似乎正在寻找与 iframe 的 contentDocument 属性等效的 IE。 “contentDocument”是 FF 支持的 W3C 标准,但 IE 不支持。 (惊喜惊喜)
【问题讨论】:
标签: javascript jquery iframe