我当前遇到一个问题,其中有一个评分系统的行和列的表。学生沿着y轴方向沿x方向评分。一旦我的向下箭头到达第6行,它将不再向下移动。左右都没有问题。如果有人有任何建议,将不胜感激!
function keyDown(keyname,e){
if (e.keyCode == 37){// Left Arrow
var NewKeyname = parseInt(keyname) - 10;
var intColNum = NewKeyname;
}
if (e.keyCode == 38){// Up Arrow
var NewKeyname = parseInt(keyname) - 1;
var intColNum = NewKeyname;
}
if (e.keyCode == 39) {// Right Arrow
var NewKeyname = parseInt(keyname) + 10;
var intColNum = NewKeyname;
} //Down Arrow
if (e.keyCode == 40) {// Down Arrow
var NewKeyname = parseInt(keyname) + 1;
var intColNum = NewKeyname;
} //Down Arrow
var setText = intColNum;
document.getElementById(setText).focus(); // Focus on the textbox
}