We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://javascript.ruanyifeng.com/dom/event-type.html#toc19
阮老师你好,在KeyboardEvent.altKey的代码示例中:
function showChar(e){ console.log("ALT: " + e.altKey); console.log("CTRL: " + e.ctrlKey); console.log("Meta: " + e.metaKey); console.log("Meta: " + e.shiftKey); } document.body.addEventListener('click', showChar, false);
监听body元素的鼠标点击事件并不会触发键盘事件, 应该监听keydown或keyup才会触发。
keydown
keyup
The text was updated successfully, but these errors were encountered:
docs(dom): edit event-type #326
b068561
谢谢指出,已经更正。
Sorry, something went wrong.
No branches or pull requests
https://javascript.ruanyifeng.com/dom/event-type.html#toc19
阮老师你好,在KeyboardEvent.altKey的代码示例中:
监听body元素的鼠标点击事件并不会触发键盘事件, 应该监听
keydown
或keyup
才会触发。The text was updated successfully, but these errors were encountered: