TabIndex is to press the Tab key to sequentially obtain the focus of the defined TabIndex elements set between each element.
Anyone who has made or filled out a form will find that using the Tab key can get the focus of each input one by one. This stuff can actually be modified, such as not wanting to be obtained, or changing the order in which it is obtained.
When filling out a form (registration, login or other), many users directly press the Tab key to jump to the next text box without using the mouse. Wait until everything is filled out, and then Yes Submit, which is a very nice and convenient feature. My personal habit is that after filling in all the things, I usually use the mouse to click the submit button, and I don’t want Tab to cause the focus to jump to the button, but I rarely find that when using Tab, the focus will not jump to the button. On the button, I don’t know if it’s just my personal habits that are too BT-_-!!!
If you don’t want something to be focused, you can tabindex=-x, so that the value of tabindex is negative. In this case Tab will skip directly.
The following is a simple form as an example: