Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个正在运行的 Windows 应用程序,当我按下“ALT+Z”时它会截屏。我想在 HTML/JS 中触发相同的动作;也就是说,HTML/JS 应该模拟/触发“ALT+Z”,以便 Windows 应用程序截取屏幕截图。
使用accesskey属性:
accesskey
<input type="button" accesskey="z" />
这将在按下时调用单击alt + z。
alt + z