JQuery - Android - The 'Keyup' Event Does

2019-06-27 20:45发布

I am wondering why the backspace/ delete button does not detect a keyup event in jQuery.

I find this odd as it is useful and should be supported. Are there any alternatives to this?

This is only happening in Android - Chrome.

Cheers

1条回答
Rolldiameter
2楼-- · 2019-06-27 21:10

You can actually fix this by attaching an event listener to the input.

var inputBox = document.getElementById('inputId');

inputBox.addEventListener(‘input’, function() {
    exampleFunc();
}, false);

Cheers

查看更多
登录 后发表回答