JS代码块console.log在chrome浏览器不显示 var year=2078 if(year%4===0&&year%100!==0||year%400===0){ console.log(year+'是闰年') } else{ console.log(year+'不是闰年') } 解决办法:页面右键->检查,点击Console,选中Info、Warnings、Errors