var dayNum = new Date(2012,2,0).getDate(); 转载于:https://www.cnblogs.com/mizzle/archive/2012/08/28/2659839.html