<html>
<body>
<input onkeydown="if(event.keyCode) document.getElementById('3').focus()">1</input><br>
<input onkeydown="if(event.keyCode) document.getElementById('3').focus()">2</input><br>
<input id="3">3</input>
</body>
</html>
<body>
<input onkeydown="if(event.keyCode) document.getElementById('3').focus()">1</input><br>
<input onkeydown="if(event.keyCode) document.getElementById('3').focus()">2</input><br>
<input id="3">3</input>
</body>
</html>
<body>
<input onkeydown="if(event.keyCode==13) document.getElementById('3').focus()">1</input><br>
<input onkeydown="if(event.keyCode==13) document.getElementById('3').focus()">2</input><br>
<input id="3">3</input>
</body>
</html>
<input onkeydown="if(event.keyCode==13) document.getElementById('3').focus()">2</input><br>
<input id="3">3</input>
document.onkeydown=function(){
if(event.keyCode==13)
document.getElementById("t3").focus();
}
</script><input type="text">
<input type="text">
<input type="text" id="t3">
<table><%
iCurrent = 0;
List list = null;
for(;iCurrent<list.size();iCurrent++ )
{%>一定要用document.getElementById()来去文本框的名称吗?用 document.theform
<td><input name="name_<%iCurrent%>"></td>
<td><input name="pass_<%iCurrent%>"></td>
<td><input name="age_<%iCurrent%>"></td>
<tr>
这样的话 我应该怎么去它的 id 啊
<td> <input name="name_ <%iCurrent%>" id="name_ <%iCurrent%>"> </td>
<td> <input name="pass_ <%iCurrent%>" id="pass_ <%iCurrent%>"> </td>
<td> <input name="age_ <%iCurrent%>" id="age_ <%iCurrent%>"> </td>
<tr>