Input Week name attribute
Definition and Usage
name
Sets or returns the value of the name attribute of the week field.
The HTML name attribute is used to identify form data after form data is submitted to the server, or to reference form data on the client using JavaScript.
Note:Only form elements that have a name attribute will pass their values when submitting the form.
See also:
HTML Reference Manual:HTML <input> name Attribute
Example
Example 1
Get the name of the week field:
var x = document.getElementById("myWeek").name;
Example 2
Change the name of the week field:
document.getElementById("myWeek").name = "newWeekName";
Syntax
Return the name attribute:
weekObject.name
Set the name attribute:
weekObject.name = name
Attribute Value
Value | Description |
---|---|
name | Specifies the name of the week field. |
Technical Details
Return Value: | A string value representing the name of the week field. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |
Note:The <input type="week"> element does not display any date field/calendar in Firefox.