代码:
<!DOCTYPE html
>
<html>
<head>
<meta charset
="utf-8" />
<title>1 ~ 50之间的偶数
</title
>
</head
>
<body>
<script>
for(var i
= 1 ; i
<51 ;i
++){
if(i
% 2 == 0){
document
.write(i
+"<br/>");
}
}
</script
>
</body
>
</html
>
运行结果:
转载请注明原文地址: https://lol.8miu.com/read-21411.html