javascript:
function SubmitKeyClick(keyEvent,ControlId)
{
if(keyEvent.keyCode == 13)
{
keyEvent.returnValue = false;
document.getElementById(ControlId).focus();
document.getElementById(ControlId).click();
}
}
输入框的代码:
<input type='text' οnkeydοwn='SubmitKeyClick(event,'提交按钮的ID')'/>