The iframe shows the content of the file it loads. In a webpage with a iframe, how to get the content of the iframe? Here is an example:
on the webpage:
<iframe id=”upload_target” name=”upload_target”></iframe>
javascript:
var xx = document.getElementById(‘MyIFrame’).contentDocument.body.innerHTML;
alert(xx);
I have tested it under IE8、firefox 3.6.12、Google Chrome 7.0.517.44, it all works.