Javascript 利用while语句实现九九乘法表

<script>
      var str = "";var row =1;//行while(row <10){
        str +="";//列var col =1;while(col < row +1){
          str +="";
          col++;}
        str +="";
        row++;}
      str +="
" + row + "*" + col + "=" + row * col + "
"
; document.body.innerHTML += str; </script>

你可能感兴趣的:(JavaScript,过程式编程)