Latest web development tutorials

HTML DOM Input Month type property

Input Month Object Reference Input Month Object

Examples

Returns the month field form element type:

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

The result of x could be:

month

try it"

Definition and Usage

type property returns the type of form field types month.

Note: In the above example, Opera, Chrome and Safari Back "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 browser does not support type = "month" <input> element attributes.


grammar

monthObject .type

technical details

return value: String representing the type of the field form element month


Input Month Object Reference Input Month Object