Element.focus() MethodNameElement.focus() Method---give keyboard focus to a form elementAvailabilityNavigator 2.0, Internet Explorer 3.0 DescriptionThe focus() method of a form element transfers keyboard focus to that element without calling the onfocus() event handler. That is, it makes the element the active one with respect to keyboard navigation and keyboard input. Thus, if you call focus() for a Text element, then any text the user types will appear in that text element. Or, if you call focus() for Button element, then the user will be able to invoke that button from the keyboard. All form elements, except the Hidden element support the focus() method. Unfortunately, not all platforms support keyboard navigation equally well. In Navigator 2.0 and 3.0 for Unix platforms, the focus() method is only functional for those form elements that display text: Text, Textarea, Password and FileUpload. |
|