日期:2014-05-17 浏览次数:20607 次
<asp:TextBox ID="txt" Text="akjdklfj" onfocus="setPosition(this)" runat="server"></asp:TextBox> <script> function setPosition(obj) { var rng = obj.createTextRange(); rng.moveStart("character",obj.value.length); rng.collapse(true); rng.select(); } </script>