Input Fires Keypress Event Twice

后端 未结 8 2215
小蘑菇
小蘑菇 2021-02-18 14:26

This question has been asked/answered (mostly) before, BUT I\'ve tried three things to stop the event from bubbling but nothing has worked:

return false;
e.stopPr         


        
8条回答
  •  借酒劲吻你
    2021-02-18 15:01

    I had same issue and I used above method and it work for me.

    $(document).unbind('keypress').bind('keypress', function (e) {
       // some logic here
    });
    

提交回复
热议问题