asp.net.ph

Skip Navigation Links

focus Method

DHTML Methods


DOM Level 1 Specification.

Causes a control to receive input focus.

Syntax

object.focus ( ) 
Return Value

No return value.

Remarks

An element normally receives focus either via the pointing device or by tabbing navigation. This method allows an author to programmatically give focus to an element, to receive input from the user.

The method also triggers the onfocus event, which executes any specified code to handle the event.

Internet Explorer® supports the method in any element that can receive the focus, such as form controls, links in anchors and area elements, etc.

Applies To

A, APPLET, AREA, BODY, BUTTON, EMBED, FIELDSET, FRAME, HTMLAREA, IFRAME, INPUT, OBJECT, SELECT, TABLE, TD, TEXTAREA, window

See Also

blur, onblur, onfocus



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note