📅  最后修改于: 2022-03-11 15:02:34.836000             🧑  作者: Mango
//jQuery submit form when Enter key is pressed
$("#myInputID").keypress(function (e) {
if (e.which == 13) {
$("#myFormID").submit();
return false;
}
});