HTML页Enter或Esc键调用逻辑,以及元素显示状态判断
/** * enter 键盘确认 * esc 键盘取消 * */window.onkeydown = function (event) { var event = event || window.event // enter 键被按下执行 if (event.keyCode == 13 || event.keyCode == 108) { ...