<!DOCTYPE html><html leng = \'en\'><head><meta charset = \'UTF-8\'/></head><body><script>var year = parseInt(prompt(\'请输入想判断的年份\'));function test(year1){if(year1 % 4 === 0 && year1 % 400 === 0 && year1 % 100 === 0){console.log(\'该年是闰年\');}}test(year);</script></body></html>
js写该年是否为闰年
未经允许不得转载:爱站程序员基地 » js写该年是否为闰年