填充到iframe的js为什么只能操作父窗口的DOM?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<body>
<div id="div1">父窗口</div>
<iframe id="iframe1" width="500" height="400"></iframe>
<script type="text/javascript">
var html='<div id="div1">子窗口<\/div>';
html+='<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"><\/script>';
html+='<script>alert($(\'#div1\').html());<\/script>';
$('#iframe1').contents().find('body').html(html);
</script>
</body>
</html>