Solve the "Focus Control" one on the web page

zhaozj2021-02-16  43

Solve the "Focus Control" one on the web page

For B / S systems, it is not as good as the C / S system on page control. If the input focus problem, the customer wants to enter the data via the keyboard, so I want 100 customers, there will be 90 Bar.

Therefore, it is necessary to resolve the focus acquisition problem. You can find some ways from the Internet, but it is more troublesome, I now introduce a very convenient. The effect is also very good. Method for everyone.

I saw the ASP.NET lecture of MS for some time. I talked about how to let the "Enter key" to move the focus of the text box. One of them, the best one is this:

Use the client script to add Document's onkeyDown event on the page, so that the page is accepted after receiving the carriage return, that is, as long as the Event's KeyCode is changed from 13 to 9

VBScript code: