监听回车事件js
程序员文章站
2022-03-05 12:02:29
...
document.addEventListener("keydown", keydown);
function keydown(event) {
if (event.keyCode !== 13)
return;
document.getElementById("elemid").click();
}