Input Time nameProperty
Example
Get the name of the time field:
var x =
document.getElementById("myTime").name;
xThe output result is:usr_time
Try it Yourself »
Definition and Usage
The name property is used to set or return the value of the name attribute of the time field.
The name attribute is typically used as an identifier when submitting form data to the server, or as a reference identifier for JavaScript on the client side.
Note:Only when the name attribute is set can data be submitted to the server after form submission.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the name attribute.
Note:Internet Explorer or Firefox browsers do not support HTML <input> elements with the type="time" attribute.
Syntax
Return the name property:
timeObject.name
Set the name property:
timeObject.name=name
Property Values
| Value | Description |
|---|---|
| name | Describes the name of the time field |
Technical Details
| Return Value: | A string, representing the name of the time field |
|---|
More Examples
Example
Change the name of the time field:
document.getElementById("myTime").name = "newTimeName";
Try it Yourself »
Related Pages
HTML Reference Manual:HTML <input> name Attribute
Input Time Object Other Extensions