Latest web development tutorials

oggetti DatetimeLocal HTML DOM di ingresso

oggetti DatetimeLocal ingresso

Ingresso oggetto DatetimeLocal è un nuovo HTML5.

Ingresso DatetimeLocal oggetto rappresentazione usando type = "datetime-locale" nel codice HTML <input> elementi.

Nota: Internet Explorer o Firefox non supporta <input> elementi.

Oggetto di input di accesso DatetimeLocal

È possibile utilizzare getElementById () per accedere utilizzando type = "datetime-locale" <input> attributi elemento:

var x = document.getElementById("myLocalDate"); 尝试一下

Suggerimento: è anche possibile formare gli elementi per accedere al DatetimeLocal raccolta ingresso di oggetti.

Creare oggetti in ingresso DatetimeLocal

È possibile utilizzare document.createElement () metodo per creare utilizzando il tipo = proprietà "datetime-locale" dell'elemento <input>:

var x = document.createElement("INPUT");
x.setAttribute("type", "datetime-local"); 尝试一下

Ingresso DatetimeLocal proprietà degli oggetti

属性 描述
autocomplete 设置或返回本地时间字段的 autocomplete 属性值
autofocus 设置或返回本地时间字段在页面加载后是否自动获取焦点
defaultValue 设置或返回本地时间字段默认的值
disabled 设置或返回本地时间字段是否可用
form 返回使用本地时间字段的表单引用
list 返回包含了本地时间字段的 datalist 引用
max 设置或返回本地时间字段的 max 属性值
min 设置或返回本地时间字段的 min 属性值
name 设置或返回本地时间字段的 name 属性值
readOnly 设置或返回本地时间字段是否只读
required 设置或返回本地时间字段在表单中是否为必填字段
step 设置或返回本地时间字段的 step 属性值
type 返回本地时间字段的表单元素类型
value 设置或返回本地时间字段的 value 属性值

proprietà ed eventi standard

Ingresso oggetti DatetimeLocal supporta anche standard di attributi ed eventi .


articoli correlati

HTML Tutorial: moduli HTML

HTML Reference Manual: HTML <INPUT> tag

HTML Reference Manual: HTML <INPUT> dell'attributo type