Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Week name Property

Input Week name property

Input Week Object Reference The Input Week object

Example

Get the name of the week field:

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

x

The output is:

bdaytime

Try it »


Definition and Usage

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

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

Note: Data can only be submitted to the server after the form is submitted if the name attribute is set.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute.

Note: Internet Explorer or Firefox browsers do not support .


Syntax

Return the name attribute:

weekObject

.name

Set the name attribute:

weekObject

.name=

name

Attribute 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

Example

Modify the name of the week field:

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

Try it »


Related pages

HTML Reference Manual: HTML name attribute


Input Week Object Reference The Input Week object