Input Date autofocus 屬性
定義和用法
autofocus 屬性用于設置或者返回 date 字段在頁面加載后是否自動獲取焦點。
該屬性反映了 HTML autofocus 屬性。
瀏覽器支持
The autofocus property 所有主流瀏覽器都支持
注意: Internet Explorer 9 及更早IE版本、 Opera 12 及更早Opera版本瀏覽器不支持該屬性。
注意:Internet Explorer 或 Firefox 瀏覽器不支持 <input type="date"> 元素。
語法
返回 autofocus 屬性:
inputdateObject.autofocus
設置 autofocus 屬性:
inputdateObject.autofocus=true|false
屬性值
值 | 描述 |
---|---|
true|false |
描述了 date 字段在頁面加載后是否獲取焦點
|
技術細節(jié)
返回值: | 布爾值,如果頁面在加載后 date 字段自動獲取焦點返回 true,否則返回false。 |
---|
相關頁面
HTML 參考手冊: HTML <input> autofocus 屬性

更多建議: