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

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐