.aspx页面加入JS代码:
function SubmitKeyClick(button) { if(event.keyCode == 13) { event.keyCode=9; event.returnValue = false; document.all[button].click(); } }
.cs页面Page_Load加入:
form1.Attributes.Add("onkeydown", "SubmitKeyClick(‘ButtonOk‘);");
时间: 2024-11-02 16:14:45