257Chapter 15Generic HTML Element Objectsform.elements[i].tabIndex = 0; (Web server iis) }

257Chapter 15Generic HTML Element Objectsform.elements[i].tabIndex = 0; } }

tabIndex Property Lab



Text box no. 1:
Text box no. 2:

And a checkbox




The final function, resetTab(), sets the tabIndexproperty value to zero for all labform ele- ments; this restores the default order. Related Items:blur(), focus()methods. tagNameValue:String.Read-Only Compatibility:WinIE4+, MacIE4+, NN6+, Moz1+, Safari1+ The tagNameproperty returns a string of the HTML or XML tag name belonging to the object. All tagNamevalues are returned in all uppercase characters, even if the source code is writtenin all lowercase or a mixture. This consistency makes it easier to perform string comparisons. For example, you can create a generic function that contains a switchstatement to executeactions for some tags and not others. The skeleton of such a function looks like the following: function processObj(objRef) { switch (objRef.tagName) { case TR : [statements to deal with table row object] break; case TD : [statements to deal with table cell object] break; case COLGROUP : [statements to deal with column group object] break; default: [statements to deal with all other object types] } } elementObject.tagName