jQuery's 'keypress' doesn't work for some keys in Chrome. How to work around?

后端 未结 6 822
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 12:20

I\'m trying to implement key-press functionality which will remove a div when the user hits Esc. This works for Firefox & IE with the following code:

<
6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 12:52

    Using Jquery.hotkey js file you can Make Sortcut key

    $(document).bind('keydown', 'esc', function(){ });
    

提交回复
热议问题