获取当月天数
function getLastDay()
{
var date = new Date();
var new_year = date.getFullYear();
var new_month = date.getMonth()+1;
if(date.getMonth()>12)
{
new_month -=12;
new_year++;
}
var new_date = new Date(new_year,new_month,1);
return (new Date(new_date.getTime()-1000*60*60*24)).getDate();
}