批改状态:合格
老师批语:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>JS测试</title>
</head>
<body>
</body>
<script type="text/javascript">
var x = 5;
var y = 9;
if(x == 5 && y == 9){
document.write('正确<br/>');
}else{
document.write('错误<br/>');
}
if(x == 5 || y == 4){
document.write('正确<br/>');
}else{
document.write('错误<br/>');
}
if(x == 3 || y == 9){
document.write('正确<br/>');
}else{
document.write('错误<br/>');
}
if(x == 3 || y == 5){
document.write('正确<br/>');
}else{
document.write('错误<br/>');
}
var arr = [1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004];
for (var i = 0; i < arr.length; i++) {
if ((arr[i]%4 == 0 && arr[i]%100 != 0)|| arr[i]%400 == 0) {
document.write('是闰年<br/>');
}else{
document.write('是平年<br/>');
}
}
</script>
</html>
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号