Causes the element to receive the focus and executes the code specified by the onfocus event. dhtml语法 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.
是否符合公共标准
This method is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To |
A,
ACRONYM,
ADDRESS,
APPLET,
AREA,
B,
BDO,
BIG,
BLOCKQUOTE,
BODY,
BUTTON,
CAPTION,
CENTER,
CITE,
CUSTOM,
DD,
DEL,
DFN,
DIR,
DL,
document,
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 | |
|