index.html:

?

1
2
<div style="height: 200px;"></div>
<iframe id="gys" src="con.html" width="100%"></iframe>

 

con.html

?

1
2
3
<body onload="parent.window.document.all.gys.height=document.body.scrollHeight">
        <div style="height: 1800px; width: 500px; margin: 0 auto; "></div>
    </body>