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

'setMonth()' Example

    
<html>
<body>
<button onclick="var myDate = new Date(); myDate.setMonth(5); alert(myDate);">SETMONTH</button>
</body>
</html>

    
      
      

Related examples in the same category

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