<script>
framename.document.designMode="On";
framename.document.open();
</script>

解决方案 »

  1.   

    怎么取得mianframe里面的ID呢?
      

  2.   

    不用取ID,只要取里面的脚本就可以
    framename.document.body.innerHTML
      

  3.   


    我之前做了个可以在IFRAME里面运行的WEB编辑器输入框用IFRAME(ID=editor)
    editor.document.designMode='On';
    if (editor.value == null) editor.value = editor.innerHTML;
    var d = editor.document;
    d.designMode = 'On';
    d.open();
    以上是我用IFRAME做的。
    但是现在么把IFRAME改成FRAME
    就是不知道怎么取FRAME的ID
      

  4.   

    我这样写也不行吖。打不开
    function window.onload()
    {

    var frm = window.parent.frames(1).name;
    frm.document..value =  frm.document.body.innerHTML;

    frm.document.designMode = "On";
    frm.document.open()
    }
    </script>