function isLeapYear(date){ //傳入日期類型 return (0==date.getYear()%4&&((date.getYear()%100!=0)||(date.getYear()%400==0))); }