<iframe id="textEdit" src="" height="120" width="200"></iframe><input name="" type="file" onChange="document.all.textEdit.src=this.value">

解决方案 »

  1.   

    opener.document.getElementById('textEdit')
      

  2.   

    刚学会的!<script language=javascript> 
    function insertHtml(HtmlCode) 
    {  
    parent.window.opener.frames.message.focus();//是编辑器获得焦点,放置代码插入在编辑器外地方 
    parent.window.opener.frames.message.document.selection.createRange().pasteHTML(HtmlCode);//在光标的位置插入html代码 
    } var src='/design_data/adcourse/uploadfile/<%=Small_Img%>'; 
    var htmlcodes; 
    htmlcodes = "<img src='"+src+"' alt='<%=d_alt%>' align='<%=d_align%>' border='<%=d_border%>' hspace='<%=d_hspace%>' vspace='<%=d_vspace%>'>"; 
    insertHtml(htmlcodes);
    window.close(); </script>