jQuery: keyup event for mobile device
问题 I'm having a few issues getting a keyup event to fire on my iPhone, my code is as follows: var passwordArray = ["word", "test", "hello", "another", "here"]; var test = document.getElementById('enter-password'); test.addEventListener('keyup', function(e) { if (jQuery.inArray(this.value, passwordArray) != -1) { alert("THIS IS WORKING"); } else {} }); The idea being that as the user is typing into the #enter-password field, as and when they've matched a word in the passwordArray the alert will