TabIndex is to select the defined TabIndex elements in sequence to set the focus between each element.
Anyone who has made or filled out the form will find that using the Tab key can get the focus of each input one by one. This thing can actually be modified, such as not wanting to be retrieved, or changing the order of acquisition.
When filling out the form (register login or other), many users do not pass the mouse, but directly press the Tab key to jump to the next text box, wait until all the things are filled out, and then submit. This is a very good and convenient function. My personal habit is that when filling in everything, the submission is usually clicked on the submit button with the mouse, and I don’t want Tab to make the focus jump to the button, but I rarely find that Tab will not jump to the button using Tab. I don’t know if it’s because my personal habit is too BT-_!!!!
If you don't want something to be taken into focus, you can tabindex=-x and make the value of tabindex negative, so that Tab will skip it directly.
Here is a simple form as an example:
Copy the code