设置光标位置不行吧
<textarea id="TxtID" rows=5 cols="80%"></textarea><br>
<input type=text id="ReplaceID"><br>
<input type=button value="获取选择文本" onclick="window.confirm(document.selection.createRange().duplicate().text);">
<input type=button value="更改选择文本" onclick="document.selection.createRange().duplicate().text=ReplaceID.value;">

解决方案 »

  1.   

    没事请看杀手锏
    http://blog.csdn.net/gjd111686/gallery/27646.aspx
      

  2.   

    呵呵,有找到沈阳的了.
    参与一下吧
    http://community.csdn.net/Expert/topic/3153/3153580.xml?temp=2.839297E-02
      

  3.   

    <SCRIPT  language=javascript>     
    function moveAtCaret(obj,n)
    {
        //将obj中光标向dirc方向移动n个字符 
        obj.focus(); 
        var rng=document.selection.createRange(); 
        rng.moveStart("character", n); 
        rng.select(); 

    </SCRIPT> 
    <body  onload="moveAtCaret(show,5)">
    <input id="show" value="1234567890">