jscript 嵌套循环案例
*
***
*****
*******
*********
***********
<script> for(var row =1 ; row <=6; row++){ for(var col=1; col <= (6 - row); col++){ document.write(" "); } var startnum =row *2 -1; for(var col=1; col <= startnum; col++){ document.write("*"); } document.write("</br>") } </script>