iframme 是活动帧
而frame是非活动帧
iframe使用方法如下
<iframe scr="sourcefile" frameborder=0 width="width" height="height"></iframe>
iframe是内嵌的,比较灵活,不过也有不好的地方,就是位置在不同的浏览器和分辨率下有可能不同,有时会把本来好好的页面搞得变形.iframe 用起来更灵活,但好象在netscape里支持的不是很好
 

解决方案 »

  1.   

    1.asp
    <iframe id="ifrm1" src="2.asp"></iframe>
    <input type=button onclick="ff()">
    <script>
    function ff()
    {
        ifrm1.somemethod();
    }
    </script>2.asp
    <body>
    </body>
    <script>
    function  somethod()
    {
    alert("2.asp_somethod");
    }
    </script>
      

  2.   

    父窗口:
    <input type=button onclick="test()">var sonTest=null;
    function test(){
        if(sunTest!=null){
            sunTest();
        }
    }iframe子窗口:
    <script>
    function test(){
        alert("IFRAME");
    }
    function doOnload(){
        var pWin = window.frameElement.ownerDocument.parentWindow;
        pWin.sunTest=test;
    }
    </script>
    <body onload="doOnload();">