<!DOCTYPE html>
<html>
<head lang="en">

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
    body {
        margin: 0;
        padding: 0;
    }
</style>

</head>
<body>

<iframe src="https://codeopend.com/" id="myiframe" scrolling="auto" frameborder="0" width="100%"></iframe>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
    //高度设置
    var height = $(window).height();
    $('#myiframe').height(height);
})
function changeFrameHeight(){
    var ifm= document.getElementById("myiframe");
    $('#myiframe').height($(window).height());
}
window.onresize=function(){
    changeFrameHeight();
}
</script>

</body>
</html>
8db685159128d597902277b17ae58c0a.jpg