在Page_Load里btn1.Attributes["OnKeyPressed"] = "javascrtipt: ...";

解决方案 »

  1.   

    add this js function to your page,and change this webForm name<script language="javascript">
    function WebForm1.onkeydown(){
    with(window.event)if(srcElement.type=="text"&&keyCode==13)keyCode=9
    }
    </script>
      

  2.   

    结合江雨兄的就是btn1.Attributes["OnKeyPressed"] = "JavaScript: onkeydown()";
      

  3.   

    江雨兄,我是想 焦点如何在txt1和txt2之间输入数据以后,输入焦点的移动。如:在txt1录入数据以后,按回车键以后,焦点到txt2上。能不能给点详细的说明。谢谢!