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

HTML DOM Input Month type Property

Input Month type Property

Input Month Object Reference Input Month Object

Example

Return the form element type of the month field:

var x = document.getElementById("myMonth").type;

The result of x could be:

month

Try it »


Definition and Usage

The type property returns the form type of the month field.

**Note:** In the example above, Opera, Chrome, and Safari return "month", but Internet Explorer and Firefox return "text".


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type attribute.

**Note:** Internet Explorer or Firefox browsers do not support the HTML using the type="month" attribute .


Syntax

monthObject

.type

Technical Details

Return Value: String, representing the form element type of the month field

Input Month Object Reference Input Month Object