文本域获得焦点置到内容的最后

 //x为文本域对象
function f_setCursorPos(x){
   var txtRange = x.createTextRange();
   txtRange.moveStart("character",x.value.length);
   txtRange.moveEnd("character",0);
   txtRange.select();
}

posted on 2009-09-25 09:51  路大侠  阅读(103)  评论(0)    收藏  举报

导航