YouTip LogoYouTip

Prop Month Type

HTML DOM Input Month type Property

HTML DOM Input Month type Property

HTML DOM Input Month type Property

-- Learning more than just technology, but dreams!

JavaScript Reference Manual

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

<input> - image

<input> - number

Deep Dive

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

Input Month type Property

Input Month Object Reference Manual 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 Yourself Β»


Definition and Usage

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

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


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type property.

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


Syntax

monthObject.type

Technical Details

Return Value: A string representing the form element type of the month field.

Input Month Object Reference Manual Input Month Object

<input> - image

<input> - number

iFlytek Star Coding Plan includes free model call quotas, DeepSeek, GLM, Kimi, MiniMax, one-stop experience and deployment platform. Configuration Guide Β₯3.9/month Subscribe Now

Click to Share Notes

Cancel

← Prop Month ValueProp Month Required β†’