可以试着把div置入另一个iframe

解决方案 »

  1.   

    iframe可以做容器吗?我实验好象不行呀。
      

  2.   

    just a example<SCRIPT language="javascript">
    function init()
    {
        var doc = document.frames["myFrame"].document;
        doc.write("<div>");
        doc.write("this is the div");
        doc.write("</div>");
    }
    </SCRIPT>
    </HEAD><BODY onLoad="init()">
    <IFRAME id="myFrame" frameborder="0" width="100px" height="100px"></IFRAME>
    </BODY>
      

  3.   

    实验成功了,和LxcJie(肖冲)真的学习到了很多的东西。谢谢。
      

  4.   

    我前天也碰到这问题!div显示在flash的下面,后来只好用iframe做了!
      

  5.   

    我其实是用DIV来画菜单的,现在理论上说是应该把DIV放再IFRAME里,可是IFRAME的位置和大小的控制不太容易呀。
    <style>
    .aaa
    {
    position:absolute;top:100;left:100;width:50;height:50;z-index:100;
    }
    </style><IFRAME width=500 height=500 style="background-color:red">
    </IFRAME><SCRIPT language="javascript">
    function init()
    {
        var doc = document.frames["myFrame"].document;
        doc.write("<table border=1 width=100% height=100%>");
        doc.write("<tr><td>456</td></tr></table>");
    }
    </SCRIPT>
    </HEAD><BODY onLoad="init()">
    <IFRAME id="myFrame" frameborder="1" class=aaa scrolling=no></IFRAME>
    </BODY>
    我现在的意思是那IFRAME当DIV用了,可是大小实在控制不好。
    我想让table充满iframe,怎么办?
      

  6.   

    <IFRAME id="myFrame" frameborder="1" marginheight="0" marginwidth="0" class=aaa scrolling=no></IFRAME>marginheight="0" marginwidth="0" 两个属性