中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

HTML DOM Input Month 對(duì)象

Input Month 對(duì)象

Input Month 對(duì)象是 HTML5 新增的。

Input Month 對(duì)象表示使用type="month" 的 HTML <input> 元素。

注意:Internet Explorer 或 Firefox 瀏覽器不支持使用 type="month" 屬性的 <input> 元素。

訪問(wèn) Input Month 對(duì)象

你可以使用 getElementById() 函數(shù)來(lái)訪問(wèn)使用 type="month" 屬性的 <input> 元素:

var x = document.getElementById("myMonth"); 運(yùn)行代碼

提示: 你同樣可以通過(guò)表單的元素集合來(lái)訪問(wèn) Input Month 對(duì)象。

創(chuàng)建 Input Month 對(duì)象

你可以使用 document.createElement() 方法來(lái)創(chuàng)建使用 type="month" 屬性的 <input> 元素:

var x = document.createElement("INPUT");
x.setAttribute("type", "month"); 運(yùn)行代碼

Input Month 對(duì)象屬性

屬性 描述
autocomplete 設(shè)置或返回 month 字段的 autocomplete 屬性值
autofocus 設(shè)置或返回 month 字段在頁(yè)面加載后是否自動(dòng)獲取焦點(diǎn)
defaultValue 設(shè)置或返回 month 字段默認(rèn)的值
disabled 設(shè)置或返回 month 字段是否可用
form 返回使用 month 字段的表單引用
list 返回包含了 month 字段的 datalist 引用
max 設(shè)置或返回 month 字段的 max 屬性值
min 設(shè)置或返回 month 字段的 min 屬性值
name 設(shè)置或返回 month 字段的 name 屬性值
readOnly 設(shè)置或返回 month 字段是否只讀
required 設(shè)置或返回 month 字段在表單中是否為必填字段
step 設(shè)置或返回 month 字段的 step 屬性值
type 返回 month 字段的表單元素類(lèi)型
value 設(shè)置或返回 month 字段的 value 屬性值

標(biāo)準(zhǔn)屬性和事件

Input Month 對(duì)象同樣支持標(biāo)準(zhǔn) 屬性事件


相關(guān)文章

HTML 教程: HTML 表單

HTML 參考手冊(cè): HTML <input> 標(biāo)簽

HTML 參考手冊(cè): HTML <input> type 屬性