var year=$('.year').val()//获取你输入的年份
if(year/400==0){
alert(year);//修改你想要输出的地方
}
else if(year/4==0&&year/100!=0){
alert(year);//修改你想要输出的地方
}
这个也有难度?
1判断某一年是否为闰年
# include
Int year,leap;
Printf(“enter year:”); Scanf(“%d”,&year);
If(year%4==0 && year%100!=0)11(year%400==0) Leap=1; else leap=0; if(leap)
print(“%d is”,year); else
print(“%d is not ”,year); print(“a leap year.\n”); return 0; }