The example in this article describes the method of js to determine the number of words remaining in the text box. Share it with everyone for your reference. The details are as follows:
Purpose: In order to more intuitively reflect how many words the user has entered when entering text in the text box, the project needs to determine the number of words remaining to be input in the text box
JS implementation method