执行ESC键的onclick
简而言之,我的问题是我想通过一行Javascript来执行Esc按钮的效果,例如执行Esc的效果onclick
kbd> 按钮。 我该怎么做呢?
[我有一个在 jQuery 框中上传的内容,所以我希望上传完成时,会自动执行转义函数来关闭该框]
Briefly, my problem is that I would like to execute the effect of Esc button by a line of Javascript, for example execute an effect onclick
of the Esc button.
How can I do It ?
[ What I have is an upload in a jQuery box, so I would like that when the upload will finish, the escape function will be executed automatically to close the box]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这是一个老问题。但是,如果有人在搜索时登陆这里,它可能会有所帮助:
首先,在所需元素(或文档)上触发事件,
然后在文档上有一个 keyup 侦听器:
I know it's an old question. However if somebody lands in here on search, it may help:
First, trigger the event on desired element (or document),
And then, have a keyup listener on document:
这段代码对我有用
This code works for me