不废话,看代码
<script type="text/javascript"> function changeFrameHW(){ var ifm= document.getElementById("ifr"); ifm.height=document.documentElement.clientHeight; ifm.width=document.documentElement.clientWidth; } window.onresize=function(){ changeFrameHW(); } </script>