focus Method

DHTML, HTML, & CSS

 
Click to return to the DHTML, HTML & CSS home page    
firstPage Method     forward Method     DHTML Methods    

focus Method


Causes a control to receive the focus, and executes the code specified by the onfocus event.

Syntax

object.focus()

Return Value

No return value.

Remarks

This method fires the onfocus event.

As of Microsoft® Internet Explorer 5, elements that expose the focus method must have the TABINDEX attribute set.

Elements cannot receive focus until the document finishes loading.

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
A, ACRONYM, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, custom, DD, DEL, DFN, DIR, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, Hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, window, XMP

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.