Easy Tutorial
❮ Dom Obj Keygen Prop Style Paddingtop ❯

Input Week name Attribute

Input Week Object

Example

Get the name of the week field:

var x = document.getElementById("myWeek").name;
bdaytime

Definition and Usage

The name attribute is used to set or return the value of the name attribute of a week field.

The name attribute is typically used as an identifier for submitting form data to the server or as a reference identifier in JavaScript on the client side.

Note: Only if 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: The <input type="week"> element is not supported in Internet Explorer or Firefox.


Syntax

Return the name attribute:

Set the name attribute:

Attribute Values

Value Description
name Describes the name of the week field

Technical Details

| Return Value: | String, representing the name of the week field | | --- | --- |


More Examples

Example

Change the name of the week field:

document.getElementById("myWeek").name = "newWeekName";

Related Pages

HTML Reference: HTML <input> name Attribute


❮ Dom Obj Keygen Prop Style Paddingtop ❯