//当在有keydown事件的控件上敲回车时变为tab public void Tab ( System.Web .UI.WebControls .WebControl webcontrol ) { webcontrol.Attributes .Add ( "onkeydown", "if(event.keyCode==13) event.keyCode=9" ); }