代碼如下:
<span style=font-family:times new roman;font-size:18px;><script type=text/javascript>
//將光標(biāo)聚焦在文本最后
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>
更多信息請(qǐng)查看IT技術(shù)專欄
2025國(guó)考·省考課程試聽報(bào)名