<iframe id="ifrTest" src="" width="580" height="399" scrolling="no" name="Web"> </iframe>document.getElementById('ifrTest').setAttribute('width','250px');
document.getElementById('ifrTest').setAttribute('height','250px');

解决方案 »

  1.   

    <iframe src="" width="580" height="399" scrolling="no" name="Web"> </iframe>
    <script>
        function $(id){return document.getElementsByTagName("iframe")[id]}
        $(0).style.width = 250;
        $(0).style.height = 250;
    </script>
      

  2.   

    <iframe src="http://www.zishu.cn" name="content" height="200" width="468" scrolling="no" id="content" frameborder="0"></iframe><script>   
    function iframes(){
     content.location= 'http://www.zishu.cn/m.html'; 
     document.getElementById('content').height= 500;
     document.getElementById('content').width= 1000; 
    }
    </script>