Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有两个按钮的aspx页面,“关闭”和“提交”按钮。当我按下键盘上的回车键时,焦点会自动转到“关闭”按钮并关闭页面。相反,我希望焦点集中在按下键盘上的 Enter 键时的“提交”按钮。
在框架上设置defaultbutton属性:
<form id="form1" runat="server" defaultbutton="btnID">
http://forums.asp.net/t/985791.aspx