摘要: function mm(y,m) { return (new Date(y,m+1,0)).getDate(); } alert("2001年二月的天数是:"+mm(2001,1));//document.write(new Date(2009, 4, 1)); //2009年5月的第1天(1月的值是0),2009年5月1日document.write(new Date(2009, 5, 0)); //2009年6月的第0天,也就是2009年5月的最后一天 阅读全文
posted @ 2009-12-01 17:48 0707 阅读(130) 评论(0) 推荐(0) 编辑