Since you checked this jQuery, I assume that you will appreciate the answer in jQuery to get around cross-browser issues.
$("#iframe01").contents()
jQuery iframe. . HTML- ( , , " htmldocument" ).
:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
$(function() {
$("#clickme").click(function() {
alert($("#iframe01").contents().find("body").html());
return false;
});
});
</script>
</head>
<body>
<p id="hello">Hello World, there an iframe below this. <a href="#" id="clickme">Click me!</a></p>
<iframe id="iframe01" src="iframe_content.html"></iframe>
</body>
</html>
, iframe , iframe , - .