HTML DOM Input Date name attribute
Examples
Get the name of date fields:
var x =
document.getElementById("myDate").name;
x The output is: bday
try it"
Definition and Usage
name property sets or returns the property value date field name
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 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 = "date"> element.
grammar
Returns the name attribute:
inputdateObject .name
Setting name attribute:
inputdateObject .name= name
Property Value
值 | 描述 |
---|---|
name | 描述了 date 字段的名称 |
technical details
return value: | String representing the name of the date field. |
---|
More examples
Examples
Modify the name of date fields:
document.getElementById("myDate").name = "newDateName";
try it"
Related Pages
HTML Reference Manual: HTML <the INPUT> name attribute
Input Date Object