📅  最后修改于: 2022-03-11 15:03:09.377000             🧑  作者: Mango
document.getElementById("id_of_textbox")
.addEventListener("keyup", function(event) {
event.preventDefault();
if (event.keyCode === 13) {
document.getElementById("id_of_button").click();
}
});