Easy Tutorial
❮ Prop Style Clip Jsref Prototype String ❯

Input Month value Attribute

Input Month Object

Example

Set the year and month for the month field:


Definition and Usage

The value attribute is used to set or return the value of the month field.

The value attribute describes the year and month of the month field.


Browser Support

All major browsers support the value attribute.

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


Syntax

Return the value attribute:

Set the value attribute:

Attribute Values

Value Description
YYYY-MM Describes the year and month. Example breakdown: YYYY - Year (e.g., 2011)<br> MM - Month (e.g., 01 for January)

Technical Details

| Return Value: | String, representing the year and month of the month field | | --- | --- |


More Examples

Example

Get the year and month of the month field:


Related Pages

HTML Reference: HTML <input> value Attribute


❮ Prop Style Clip Jsref Prototype String ❯