25.176. Input.focus( ): give keyboard focus to a form elementDOM Level 2 HTML25.176.1. Synopsisvoid focus( ) 25.176.2. 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 active with respect to keyboard navigation and keyboard input. Thus, if you call focus( ) for an input element of type "text", any text the user subsequently types appears in that text element. Or, if you call focus( ) for an element of type "button", the user can then invoke that button from the keyboard. |