SOURCE

        /* var shur= prompt('请输入年份');
         if(shur % 4 == 0 && shur % 100 != 0 || shur % 400 == 0){
             alert(shur);
         }
    */
        function isruinian(year) {
            //如果返回的事ture 否则返回false
            var flag = false;
            if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
flag = true;
            }
            return flag;
        }
        console.log(isruinian(2000));
        console.log(isruinian(2001));
console 命令行工具 X clear

                    
>
console