try:
<textarea id=demo>press button</textarea>
<input type=button value=">" onclick=go(3)>  
<script> 
function go(n){
if(demo.value.length<n)return;
demo.focus();
with(document.selection.createRange()){moveStart("character",n);collapse();select();}
}
</script>
fason 的,
http://expert.csdn.net/Expert/topic/1807/1807500.xml?temp=.2157099
你可以自己去看,我记得以前秋水写过一个好象跟这个差不多
烦死了。每次都抄别人的,自己又不会写。呵呵,想起来真难过