<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
<input type="text" name="year" id="year" value=""/>
<input type="button" name="save" value="是闰年吗" onclick="save()"/>
<script language="javascript">
var year="";
if(year==""){
alert("请输入一个年份");
}
year=scanner.nextInt();
function save(){
if ((year%4 ==0 && year%100!=0)||year%400 ==0)
{
alert("是");
}
else
{
alert("不是");
}
}
</script>
</body>
</html>
首页上一页 1 下一页尾页 3 条记录 1/1页