'getMonth()' Example : getMonth « Javascript Methods « JavaScript Reference

'getMonth()' Example

    
<html>
<body>
<button onclick="var myDate = new Date(); alert(myDate.getMonth());">
get month</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'getMonth()' Syntax, Parameters and Note
2.'getMonth()' is applied to