<html>
<head>
<title></title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
$(function(){
$("iframe").contents().find("html body").append("<p>xxxxxxxxxxxxxxxxxxxxxxxx<p>");
});
</script>
</head>
<body>
<div>
<iframe src="http://www.baidu.com" width="1000" height="600" ></iframe>
</div>
<div> </div>
</body>
</html>问题:为何append()没有作用?
<head>
<title></title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
$(function(){
$("iframe").contents().find("html body").append("<p>xxxxxxxxxxxxxxxxxxxxxxxx<p>");
});
</script>
</head>
<body>
<div>
<iframe src="http://www.baidu.com" width="1000" height="600" ></iframe>
</div>
<div> </div>
</body>
</html>问题:为何append()没有作用?
$("iframe",document.body).append("<p>xxxxxxxxxxxxxxxxxxxxxxxx<p>");
});
??
$("iframe").contents().find("html body").append("<textarea></textarea>"); <iframe src="show.html" width="1000" height="600" ></iframe>