读书人

有4个textbox想实现第一个输入内容后自

发布时间: 2012-01-29 21:39:32 作者: rapoo

有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 '); ");

读书人网 >asp.net

热点推荐