HTML DOM Input Time autofocus attribute
Examples
See if time field is automatically get the focus when the page is loaded:
var x = document.getElementById("myTime").autofocus;
x The output is: true
try it"
Definition and Usage
autofocus attribute is used to set or return time field whether to automatically get the focus when the page loads.
Property reflects the HTML autofocus property.
Browser Support
All major browsers support the autofocus attribute
Note: Internet Explorer 9 and earlier versions of IE or Opera 12 or earlier version of Opera browser does not support autofocus attribute.
Note: Internet Explorer or Firefox browser does not support type = "time" attribute of the HTML <input> elements.
grammar
Back autofocus properties:
timeObject .autofocus
Setting autofocus properties:
timeObject .autofocus=true|false
Property Value
值 | 描述 |
---|---|
true|false |
描述了 time 字段在页面加载后是否获取焦点
|
technical details
return value: | Boolean field if the page time to get the focus automatically after loading returns true, otherwise returns false. |
---|
Related Pages
HTML Reference Manual: HTML <the INPUT> The autofocus attribute
Input Time Object