keyup and keydown events are invalid on IOS

I am working on a webapp project recently and encountered a very strange problem. Using the keydown event to trigger the request is no problem in the chrome emulator and Android . There is absolutely no data on IOS , so I recalled that the projects I had done before also encountered the compatibility problem of keydown on ios, so I searched on the Internet, and finally implemented it with native writing and sending. After testing Android and IOS No problem. The specific code is as follows:


document.getElementById('testautofocus').addEventListener('input', function(e){  }); 


PS: I can also see the advantages of js’s power and good compatibility from the events in Zhejiang. Let’s learn native js well O(∩_∩)O haha~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325630870&siteId=291194637