JS:回车提交表单

                                            <script type="text/javascript">
    function keyDown()
    {
        var e=event.srcElement;
      
        if(event.keyCode==13)
        { 
         document.getElementById("btnSearch").focus();
         document.getElementById("btnSearch").click();
        }
    }
    </script>
<asp:TextBox ID="txtGroupName" runat="server" Height="17px" Width="132px" onkeydown="keyDown();"></asp:TextBox>
 <asp:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" />

posted on 2009-07-28 15:03  魏绰  阅读(627)  评论(0编辑  收藏  举报

导航