Input.focus() (Method)

Brings input focus back to the input element.

Availability:

DOM level - 1
JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Opera - 3.0
JavaScript syntax:-myInputObject.focus()

The receiving input element will receive a Focus event trigger and execute its function referred to by the onfocus property.

The element that previously had focus (if any element did) will receive a Blur event trigger.

See also:Input.blur(), onBlur, onFocus, Window.blur(), Window.focus()