梦之都
JavaScript教程
getMonth
函数返回date对象中的月份(0-11),中文形式的看这个示例
JavaScript getMonth() 函数返回date对象中的中文的月份示例
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>JavaScript getMonth() 函数示例</title> </head> <body> <script type="text/javascript"> var d = new Date(); document.write(d.getMonth()); </script> </body> </html>