我给你了一个例程,只用了一个输入框的动作,其余的是一样的原理
<HTML>
<head>
<script language="javascript">
function change_focus(ss)
{
if (ss=="t1")
{
if (event.keyCode==37)  //左
{

}
else if (event.keyCode==38)    //上
{

}
else if (event.keyCode==39)  //右
{
form1.t2.focus();
}
else if (event.keyCode==40)    //下
{
form1.t3.focus();
}
}}
</script>
</head>
<body>
<form name=form1>
<input type="text" name="t1" width="30"  onkeydown="change_focus('t1');">
<input type="text" name="t2" width="30"  onkeydown="change_focus('t2');">
<br>
<input type="text" name="t3" width="30"  onkeydown="change_focus('t3');">
<input type="text" name="t4" width="30"  onkeydown="change_focus('t4');">
</form>
</body>
</HTML>