Someone even asked me, "there are five text boxes on the page. Each text box can only enter one character. How can I use JavaScript to automatically jump to the second one after the user enters the first text box .".
I said that this function should not be implemented by Tab? After the user inputs, just press the Tab key, and the user can also control whether to switch to the next one (because the user may also input an error ).
But he insisted that it was what the boss demanded. I finally had to help him implement this function. But it is strange.
When I used to use js just now, I felt that js was amazing and could make some complicated functions simple and easy. Later, I learned that JavaScript cannot do many things, such as operating client files.
At that time, I often complained why JavaScript cannot implement the functions that can be implemented in other languages, so I did a lot of things that should not have been done by js myself.
Once, to read a resource file, I wrote hundreds of lines of code in Javascript, and only read a row of content in xml, later, when I returned the code, I found that the previously written code can be implemented using vb.net or C # Up to five lines.
I think js should not do too many additional events. Another reason is the limitation of js itself. js runs on the client and all code is sent to the client machine for execution. As a result, some logic like encrypting user data should not be implemented in js.