setSelectionRange方法解决光标错位问题

inputElement.setSelectionRange(value.length, value.length); 
原文地址:https://www.cnblogs.com/chaoyuehedy/p/9768123.html