<SCRIPT type=text/javascript>
function insertText(text) {
var sel = editdoc.selection.createRange();
sel.pasteHTML(text);
}
function newEditor(abc) {    
var iframe = document.createElement('iframe');
var textobj = $('abc');
editbox = textobj.parentNode.appendChild(iframe);
editwin = editbox.contentWindow;
editdoc = editwin.document;
}
function insertSmiley(smilieid) {   
var obj = typeof 1 == 2 || !1 ? 1 : editwin;
obj.focus();
var src = $('smilie_' + smilieid).src;
insertText('<img src="' + src + '" border="0" smilieid="' + smilieid + '"/> ');
}
function $(id) {
return document.getElementById(id);
}
</SCRIPT> <IMG id=smilie_1 onclick=insertSmiley(1) alt=:) src="Google_files/smile.gif"  border=0>
<DIV id=abc>            
<INPUT  onclick=newEditor() type=button value=所见即所得模式>          
<textarea name="message" id="abc"></textarea>
</DIV>这代码是人家那里复制过来的,点那个“所见即所得模式”后再点图片可以在新增加的iframe中显示,如何直接在textarea中直接显示而不新建iframe呢