不会做,不过FAQ里面应该有些对你有帮助的帖子,帮你友情UP一下^_^

解决方案 »

  1.   

    <SCRIPT>  
    function storeCaret (textEl) { 
    if (textEl.createTextRange)  
    textEl.caretPos = document.selection.createRange().duplicate();  

    function insertAtCaret (textEl, text) { 
    if (textEl.createTextRange && textEl.caretPos) { 
    var caretPos = textEl.caretPos; 
    caretPos.text =caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?text + ' ' : text;  
    }  
    else  
    textEl.value = text; }  
    </SCRIPT>  
    </HEAD>  
    <BODY>  
    <FORM NAME="aForm"> 
    <TEXTAREA NAME="aTextArea" ROWS="5" COLS="80" WRAP="soft" ONSELECT="storeCaret(this);" ONCLICK="storeCaret(this);" ONKEYUP="storeCaret(this);"> 这是例子,你可以在这里添加文字、插入文字。 </TEXTAREA>  
    <BR>  
    <INPUT TYPE="text" NAME="aText" SIZE="80" VALUE="我要在光标处插入这些文字"><BR> 
    <INPUT TYPE="button" VALUE="我要在光标处插入上面文本框里输入的文字!" ONCLICK="insertAtCaret(this.form.aTextArea, this.form.aText.value);"> 
    </FORM>