JavaScript——new Date().getMonth()

new Date().getMonth();

说明:参照现在的月份,getMonth()返回的是0-11的数字,也就是说0=1月,1=2月……11=12月

当前的月份就是,new Date().getMonth()+1;

posted @ 2013-08-08 17:06  morven  阅读(3564)  评论(0编辑  收藏  举报