日期:2014-05-19  浏览次数:20421 次

有4个textbox想实现第一个输入内容后自动把焦点放到第二个textbox里,依次类推,求教
有4个textbox想实现第一个输入内容后自动把焦点放到第二个textbox里,依次类推,求教

------解决方案--------------------
function move(nexttbid)
{
if(event.keyCode==13)
{
document.getElementById(nexttbid).focus();
}
}

textbox1.Attribute.Add( "onkeypress ", "move( 'textbox2 '); ");
textbox2.Attribute.Add( "onkeypress ", "move( 'textbox3 '); ");
textbox3.Attribute.Add( "onkeypress ", "move( 'textbox4 '); ");