仅限标记作用,方便以后使用。
function toEnd (obj){// var obj = event.srcElement ? event.srcElement : event.target;if (obj.createTextRange) {//IE浏览器var range = obj.createTextRange();range.moveStart("character", obj.value.length);//getObj('identity_card')range.moveEnd("character", obj.value.length);range.collapse(true);range.select();} else {//非IE浏览器// obj.setSelectionRange(getObj('identity_card').value.length, getObj('identity_card').value.length);
obj.setSelectionRange(obj.value.length, obj.value.length);obj.focus();}
}