YouTip LogoYouTip

Prop Week Name

HTML DOM Input Week name Property

HTML DOM Input Week name Property

-- Learning is not just about technology, but also about dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

<input> - url

<keygen>

Deep Dive

  • Web Design and Development
  • Web Services
  • Software
  • Programming
  • Computer Science
  • Scripting
  • Scripting Languages
  • Web Service
  • Development Tools
  • Programming Languages

Input Week name Property

Image 8: Input Week Object Reference Input Week Object

Example

Get the name of the week field:

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

x output result is:

bdaytime

Try it yourself Β»


Definition and Usage

The name property 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 for JavaScript on the client side.

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


Browser Support

Image 9: Internet ExplorerImage 10: FirefoxImage 11: OperaImage 12: Google ChromeImage 13: Safari

All major browsers support the name property.

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


Syntax

Return the name property:

weekObject.name

Set the name property:

weekObject.name=name

Property Values

Value Description
name Specifies the name of the week field

Technical Details

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

More Examples

Example

Change the name of the week field:

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

Try it yourself Β»


Related Pages

HTML Reference: HTML <input> name Attribute


Image 14: Input Week Object Reference Input Week Object

← Prop Week ReadonlyProp Week Name β†’