<TEXTAREA ROWS="20" COLS="100" id='test'>123456798<B>123</B></TEXTAREA>
<INPUT TYPE="button" value='insert("abc")' OnClick='_insertText("abc")'>
<SCRIPT LANGUAGE="JavaScript">
<!--
    var _insertText = function(A){
        var B = document.getElementById('test');
        B.focus();
        var C = document.selection.createRange();
        if(C){
            if(C.text.length > 0) C.text += A;
            else C.text= A;

                                               C.select();
        }
    }
//-->
</SCRIPT>
赞(0) 踩(0)
发表我的评论

最新评论

  1. 暂无评论