jQuery: keyup event for mobile device

后端 未结 4 1920
小鲜肉
小鲜肉 2020-11-28 14:30

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\", \"ano         


        
4条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 15:06

    You can add input event. It is an event that triggers whenever the input changes. Input works both on desktop as well as mobile phones

    test.on('keyup input', function(){
      //code
    });
    

    You can check this answer for more details on jQuery Input Event

提交回复
热议问题