JavaScript Reference/Javascript Methods/getMonth
"getMonth()" Example
<source lang="javascript">
<html> <body> <button onclick="var myDate = new Date(); alert(myDate.getMonth());"> get month</button> </body> </html>
</source>
"getMonth()" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |Date | +----------------+--------------------------------------------------------------+
</source>
"getMonth()" Syntax, Parameters and Note
<source lang="javascript">
Note: Returns the month. Return value: 0 to 11, with 0 representing January and 11 representing December.
Syntax:
dateName.getMonth()
</source>