html中嵌入一个iframe;现在想在iframe中操作父级html中的元素;
操作如下:
父级html
<html>
<head></head>
<body>
<div id="father" >父级html</div>
<iframe src="iframe.html"></iframe>
</body>
</html>
iframe页面
<html>
<head>
<script type="text/javascript">
$("body",parent.document).find('#father').html("替换内容");
</script>
</head>
<body>
子集iframe
</body>
</html>