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" />
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" />