Snippets

代码片段收集板

将鼠标移动到最后edit

日期:

作者: 小胡子哥

function moveCursorToEnd(el) {
    if (typeof el.selectionStart == "number") {
        el.selectionStart = el.selectionEnd = el.value.length;
    } else if (typeof el.createTextRange != "undefined") {
        el.focus();
        var range = el.createTextRange();
        range.collapse(false);
        range.select();
    }
}
标签:

loading...

这网速真是弱爆了...客官稍等,评论还在加载~