HTML DOM Input Time name Property
JavaScript Reference
JavaScript Objects
- JavaScript Array Object
- JavaScript Boolean Object
- JavaScript Date Object
- JavaScript Math Object
- JavaScript Number Object
- JavaScript String Object
- JavaScript RegExp Object
- JavaScript Global Properties/Functions
- JavaScript Operators
- JavaScript Error
Browser Objects
DOM Objects
- HTML DOM Document Object
- HTML DOM Element Object
- HTML DOM Attribute Object
- HTML DOM Event Object
- HTML DOM Console Object
- CSSStyleDeclaration Object
- DOM HTMLCollection
HTML Objects
- <a>
- <area>
- <audio>
- <base>
- <blockquote>
- <body>
- <button>
- <canvas>
- <col>
- <colgroup>
- <datalist>
- <del>
- <details>
- <dialog>
- <embed>
- <fieldset>
- <form>
- <iframe>
- <frameset >
- <img>
- <ins>
- <input> - button
- <input> - checkbox
- <input> - color
- <input> - date
- <input> - datetime
- <input> - datetime-local
- <input> - email
- <input> - file
- <input> - hidden
- <input> - image
- <input> - month
- <input> - number
- <input> - range
- <input> - password
- <input> - radio
- <input> - reset
- <input> - search
- <input> - submit
- <input> - text
- <input> - time
- <input> - url
- <input> - week
- <keygen>
- <link>
- <label>
- <legend>
- <li>
- <map>
- <menu>
- <menuItem>
- <meta>
- <meter>
- <object>
- <ol>
- <optgroup>
- <option>
- <param>
- <progress>
- <q>
- <script>
- <select>
- <source>
- <style>
- <table>
- <td>
- <th>
- <tr>
- <textarea>
- <title>
- <time>
- <track>
- <video>
Explore
- Development Tools
- Scripts
- Programming Languages
- Software
- Computer Science
- Scripting Languages
- Web Design and Development
- Web Services
- Web Service
- Programming
Input Time name Property
Example
Get the name of the time field:
var x = document.getElementById("myTime").name;
x output result is:
usr_time
Definition and Usage
The name property is used to set or return the value of the name attribute of a time field.
The name attribute is typically used as an identifier for submitting form data to the server, or as a reference identifier for JavaScript on the client side.
Note: The name attribute must be set in order for data to be submitted to the server after the form is submitted.
Browser Support
The name property is supported by all major browsers.
Note: Internet Explorer and Firefox do not support the HTML <input> element with the type="time" attribute.
Syntax
Return the name property:
timeObject.name
Set the name property:
timeObject.name=name
Property Values
| Value | Description |
|---|---|
| name | Specifies 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";
Related Pages
HTML Reference: HTML <input> name Attribute
YouTip