Blogger Information
Blog 8
fans 0
comment 2
visits 7237
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
JS简单的if流程和符号的操作_3月25日
烛光的博客
Original
1115 people have browsed it
<!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>


Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post