var year=prompt("请输入年份")//弹出输入框
var a1=year%4==0
var a2=year%100!=0
var a3=year%400==0
var result=(a1&&a2)||a3?"该年是闰年":"该年的平年"//三目运算符
alert(result)
</script>
var year=prompt("请输入年份")//弹出输入框
var a1=year%4==0
var a2=year%100!=0
var a3=year%400==0
var result=(a1&&a2)||a3?"该年是闰年":"该年的平年"//三目运算符
alert(result)
</script>