How to Use the input event to listen to the input and input events of Mobile Terminals
Today, I encountered a new requirement. The manager asked the comment function to limit the number of words, just like Weibo, to enter a maximum of 150 words. Here I need to remind users of the number of words they can enter in real time.
At the beginning, I thought of listening to the keyup event and calculating the number of words entered by the user. However, some buttons (such as the delete key) do not trigger the event.
Later, I checked and added a new html5InputThis event is similar to the change event, but the change event is triggered only when the element loses focus, and the input event is triggered when the element value changes.
At present, apart from IE89, other browsers support good services and can be safely used on mobile terminals.
In this article, how to use the input event to listen to the input on the Mobile End is all the content that I have shared with you. I hope to give you a reference and support for the customer's house.
Address: http://www.cnblogs.com/wodertian/p/5391113.html