Input Week nameProperty

Input Week 对象参考手册Input Week Object

Examples

Get the name of the week field:

var x = document.getElementById("myWeek").name;
xThe output is:
bdaytime

Try it Yourself »

Definition and Usage

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

The name attribute is commonly used as an identifier for 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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute.

Note:Internet Explorer or Firefox browsers do not support the <input type="week"> element.


Syntax

Return the name attribute:

weekObject.name

Set the name attribute:

weekObject.name=name

Property Values

Value Description
name Describes the name of the week field

Technical Details

Return Value: A string representing the name of the week field


More Examples

Examples

Change the name of the week field:

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

Try it Yourself »


Related Pages

HTML Reference:HTML <input> name Attribute


Input Week 对象参考手册Input Week Object Other Extensions