求一个循环判断语句
现在有一个变量L,他的变化情况如下:
0 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
..........
现在我想当L=1,3,5,8,10,12,15,17,19的时候执行下面的语句
response.write "<td width=15></td>"
该如何做判断了!~~
[解决办法]
Select Case L Case 3,5,8,10,12,15,17,19 Response.Write(""<td width=15></td>") Case Else Response.Write("Other!")End Select
[解决办法]
Select Case L Case 3,5,8,10,12,15,17,19 Response.Write("<td width=15></td>") Case Else Response.Write("Other!")End Select
[解决办法]
<script type="text/javascript"> function test(){ var flag=true; var str=""; for(var i=1;i<=100;i++){ if(i%7==0){ if(flag){flag=false;} else{flag=true;} } if(flag){ if(i%2!=0){ document.write(i+" "); } } else{ if(i%2==0){ document.write(i+" "); } } } } test(); </script>