JavaScript Tutorial/Date/getMonth — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:25, 26 мая 2010
Date.getMonth
The getMonth() method returns the month portion of the Date object expressed as an integer from 0 (January) to 11 (December).
<source lang="javascript">
<html> <head> <title>Current Month</title> </head> <body> <script language="JavaScript" type="text/javascript">
</script> </body> </html></source>
Date.getMonth() with switch statement
<source lang="javascript">
<html>
<script language="JavaScript"> </script> </html></source>
Translate the Date().getMonth() to month name
<source lang="javascript">
<html> <head> <title>Combine Date Values</title> </head> <body> <script language="JavaScript" type="text/javascript">
</script> </body> </html></source>