<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script>
function isRunYear(year) {
//如果是闰年返回true,不是则返回false。
var flag = false;
if (year % 4 == 0 && year % 100 !=0 || year % 400 == 0){
flag = true;
}
return flag;
}
console.log(isRunYear(2000));
</script>
</head>
<body>
</body>
</html>