<span style="font-family:Times New Roman;font-size:18px;"><script type="text/javascript"> //将光标聚焦在文本最后 function cursorEnd(){ var e = event.srcElement; var r = e.createTextRange(); r.moveStart('character',e.value.length); r.collapse(true); r.select(); } </script> <input type=text name="test" value="test" onfocus="cursorEnd()"></span>