HTML DOM Input DatetimeLocal name attribute
Examples
Get Local Time Field Name:
var x = document.getElementById("myLocalDate").name;
x The output is: bdaytime
try it"
Definition and Usage
name attribute is used to set or return the name attribute value local time field.
name attribute is typically used to server identifiers submitted form data, or the client as a Javascript reference identification.
Note: Only the name attribute is set, in the form submission to submit data to the server.
Browser Support
All major browsers support attribute name
Note: Internet Explorer or Firefox browser does not support <input type = "datetime-local "> element.
grammar
Returns the name attribute:
datetimelocalObject .name
Setting name attribute:
datetimelocalObject .name= name
Property Value
值 | 描述 |
---|---|
name | 描述了本地时间字段的名称 |
technical details
return value: | String representing the name of the local time field |
---|
More examples
Examples
Modify the name of the local time field:
document.getElementById("myLocalDate").name = "newDatetimeName";
try it"
Related Pages
HTML Reference Manual: HTML <the INPUT> name attribute
Input DatetimeLocal objects