Blogger Information
Blog 12
fans 0
comment 0
visits 7495
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
JavaScript第1课:基础案例_判断是否为闰年_2019.3.25
风雨中的脚步的博客
Original
702 people have browsed it

实例

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<script>
	// var year=2000;
	// if((year%4==0&&year%100!=0)||(year%400==0)){  //能被4整除,但是不能被100整除,或者能被400整除的
	// 	alert("是闰年");
	// }else{
	// 	alert("不是闰年");
	// }

	var a=80;
	if(a>=90;){                             //判断条件是否成立,成立则输出,不成立则继续下一条判断
		alert('你的成绩表现为:优秀');
	}else if(a>=80;){
		alert('你的成绩表现为:良好');
	}else if(a>=70;){
		alert('你的成绩表现为:良好');
	}else if(a>=60;){
		alert('你的成绩表现为:良好');
	}else{                                  //如果以上条件都不成立则输出
		alert('成绩不及格,请加油哦');
	}
</script>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:Uncorrected

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!