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.
可能重复: 用javascript模拟左右箭头键事件
我希望当我单击一个按钮时会发出一个键码。例如,网页上某处有一个按钮。当您单击此按钮时,将j发出密钥代码(或者可能是快捷方式cmd+j)。我怎样才能做到这一点?