作者: 文章来源:
本文原地址:https://www.mimiwuqi.com/biji/194912.html
js原生方法使用keyCode
document.onkeyup = function (event) {
var e = event ? event : window.event;
if (e.keyCode == 13) {//旧版火狐、Opera请使用e.which
alert('您按了回车键。');
}
};




更多 建站笔记 请访问 https://www.mimiwuqi.com/biji/