I see that you are using asp.net. You can use this example in html code to select a default button that will be activated by pressing enter
<asp:Panel ID="Panel1" runat="server" DefaultButton="LogIn">
<p class="InfoText">Username:</p>
<asp:TextBox ID="Username" runat="server"></asp:TextBox>
<p class="InfoText">Password:</p>
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
</asp:Panel>
Hope this helps.
solved Javascript function only works in edge not chrome, firefox or opera