<!--是说label?-->
<script>
checkiandj :
while (i<4) {
   document.write(i + "<BR>");
   i+=1;   checkj :
   while (j>4) {
      document.write(j + "<BR>");
      j-=1;
      if ((j%2)==0)
         continue checkj;
      document.write(j + " is odd.<BR>");
   }
   document.write("i = " + i + "<br>");
   document.write("j = " + j + "<br>");

</script>

解决方案 »

  1.   

    Labeled 语句
    为语句提供一个标识符。label :
       statements 参数
    label必选项。在引用有标签的语句时使用的一个唯一的标识符。 statement可选项。与 label 相关联的一个或多个语句。可以是复合语句。说明
    标签由 break 和 continue 语句使用,用来指示 break 和 continue 应用于哪个语句。示例
    在下面的语句中,continue 语句使用一个 labeled 语句来创建一个数组,在该数组中,每行的第三列包含一个未定义的值: function labelDemo(){
       var a = new Array();
       var i, j, s = "", s1 = "";
       Outer:
          for (i = 0; i < 5; i++)
          {
             Inner:
                for (j = 0; j < 5; j++)
                {  
                   if (j == 2)
                      continue Inner;
                   else
                      a[i,j] = j + 1;
                }
          }
          for (i = 0;i < 5; i++)
          {
             s = ""
             for (j = 0; j < 5; j++)
             {
                s += a[i,j];
             }
             s1 += s + "\n";
          }
          return(s1)
    }
      

  2.   

    <script>
    function aa( countA )
    {
        if( countA == 10 )
        {
             return ;
        }
        alert( countA )
        aa( countA + 1 )
    }
    aa( 0 )
    </script>
      

  3.   

    var m=5; //共几个Banner随机显示 
    var n=Math.floor(Math.random()*m+1) 
    document.write('<table width="98%"  border="0">')
    switch(n) 
    { case 1: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_noline.gif" hspace="3"></td></tr>'); 
    break; 
    case 2: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_noline.gif" hspace="3"></td></tr>');
    break; 
    case 3: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_online.gif" hspace="3"></td></tr>');
    break; 
    case 4: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_noline.gif" hspace="3"></td></tr>'); 
    break; 
    case 5: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_noline.gif" hspace="3"></td></tr>');
    break; 
    } document.write(n);Inner:
    m1=5
    n1=Math.floor(Math.random()*m1+1)if (n1==n) { 
    continue Inner;

    switch(n1) 

    case 1: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_noline.gif" hspace="3"></td></tr>'); 
    break; 
    case 2: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_noline.gif" hspace="3"></td></tr>');
    break; 
    case 3: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_online.gif" hspace="3"></td></tr>');
    break; 
    case 4: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_noline.gif" hspace="3"></td></tr>'); 
    break; 
    case 5: 
    document.write('<tr><td class="font-12px120-666666">[email protected]<img src="../help/img_help/msn_noline.gif" hspace="3"></td></tr>');
    break; 

    document.write(n1);
    想法是n1不等n的情况下,往下走。如果n1=n的话,重新算n1随机
      

  4.   

    我用do while 做了,但是怎样能实现多条件,,,我现在只能一个条件,多了就不行了