<html>
<head>
<script language="javascript">
function test()
{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart('character',e.value.length);
r.collapse(true);
r.select();
}function goTextB()
{
if(event.keyCode==39) form1.TextB.focus();
}function goTextA()
{
if(event.keyCode==37) form1.TextA.focus();
}</script>
</head>
<body onselectstart="return false">
<form name="form1" method="post" action="test.asp">
<input type="text" name="TextA" value="123" onfocus="test()" onkeydown="goTextB()">
<input type="text" name="TextB" value="123" onfocus="test()" onkeydown="goTextA()">
</form>
</body>
</html>
<head>
<script language="javascript">
function test()
{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart('character',e.value.length);
r.collapse(true);
r.select();
}function goTextB()
{
if(event.keyCode==39) form1.TextB.focus();
}function goTextA()
{
if(event.keyCode==37) form1.TextA.focus();
}</script>
</head>
<body onselectstart="return false">
<form name="form1" method="post" action="test.asp">
<input type="text" name="TextA" value="123" onfocus="test()" onkeydown="goTextB()">
<input type="text" name="TextB" value="123" onfocus="test()" onkeydown="goTextA()">
</form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货