Blogger Information
Blog 3
fans 0
comment 0
visits 4760
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
用JavaScript的IF 语句判断平年闰年
快乐生活的博客
Original
2908 people have browsed it

<script type="text/javascript">

var year = 2000;
 if (year%4 ==0 && year%100 !=0) {
  alert('是闰年');
 }else if (year%400 ==0) {
  alert('是闰年');
 }else{
  alert('是平年');
 }
</script>

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