JavaScript Reference/Javascript Methods/setMonth
Версия от 18:30, 25 мая 2010; (обсуждение)
"setMonth()" Example
<html>
<body>
<button onclick="var myDate = new Date(); myDate.setMonth(5); alert(myDate);">SETMONTH</button>
</body>
</html>
"setMonth()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |Date |
+----------------+--------------------------------------------------------------+
"setMonth()" Syntax, Parameters and Note
Note:
Sets the month.
Syntax:
dateName.setMonth(param1, param2)
Parameters:
param1 Required; the month. Value: 0 to 11.
param2 Optional; the day of the month. Value: 1 to 31.