Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change tab/focus order in an HTML table so that it transfers vertically first and then horizontally?

Is it possible to change tab/focus order in an HTML table so that it transfers vertically first and then horizontally?

like image 895
agsamek Avatar asked Aug 26 '09 08:08

agsamek


People also ask

How do I change the order of tab focus in HTML?

Another related tactic is to use the tabindex attribute. A tabindex of -1 (tabindex="-1") will remove an element from the tab order. A tabindex of 0 (tabindex="0") will add an element to the focus order. It is highly recommended to avoid positive tabindex values and to structure your DOM in the correct order.

How do I change the order of tabs in HTML?

The tabindex attribute specifies the tab order of an element (when the "tab" button is used for navigating). The tabindex attribute can be used on any HTML element (it will validate on any HTML element.

How do I change the order of my Tabindex?

The only way to change this order is to reorder your HTML elements. tabindex itself can do 2 things: it sets the order of "focusable" elements. it makes element "focusable".


2 Answers

I suppose you have some kind of input elements in your table and on those you can set the tabindex attribute.

<TABLE>
<TR>
  <TD><INPUT NAME="Name" TABINDEX=1></TD>
  <TD><INPUT NAME="Age" TABINDEX=3></TD>
</TR>
<TR>
  <TD><INPUT NAME="Sex" TABINDEX=2></TD>
  <TD><INPUT NAME="Location" TABINDEX=4></TD>
</TR>
</TABLE>
like image 176
Jonas Elfström Avatar answered Oct 06 '22 16:10

Jonas Elfström


Look at the tabindex attribute.

like image 27
deceze Avatar answered Oct 06 '22 15:10

deceze