function initEditor() {
var htmlString = parent.document.all.EditorValue.value; //把父窗口的EditorValue的值赋值给变量
textEdit.document.designMode="On" //设置textEdit为可编辑状态
textEdit.document.open()//打开文档供写入内容
textEdit.document.write(htmlString)//写入字符串
textEdit.document.close()//关闭
textEdit.focus()//获得焦点
}
window.onload = initEditor //窗口装载完毕执行initEditor 函数

解决方案 »

  1.   

    function initEditor() {
    var htmlString = parent.document.all.EditorValue.value; //把父窗口的EditorValue的值赋值给变量
    textEdit.document.designMode="On" //设置textEdit为可编辑状态
    textEdit.document.open()//打开文档供写入内容
    textEdit.document.write(htmlString)//写入字符串
    textEdit.document.close()//关闭
    textEdit.focus()//获得焦点
    }
    window.onload = initEditor //窗口装载完毕执行initEditor 函数