js99乘法表

xiaoxiao2021-02-28  8

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <script> for(var w=0; w<5; w++){ for(var e=0; e<5; e++){ document.write("*"); } document.write('<br>'); } document.write('<br>'); for(var w=1; w<=9; w++){ for(var e=1; e<=w; e++){ document.write(w+"*"+e+"="+w*e+" "); } document.write('<br>'); } document.write('<br>'); document.write('<br>'); document.write('<br>'); for( var m=1; m<=9; m++){ for (var b=1; b<=m; b++){ document.write(m+"*"+b+"="+m*b+" ") } document.write('<br>'); } </script> </body> </html> <!--for (循环变量初始化表达式; 循环条件表达式; 更新循环变量表达式) { 循环体 }-->
转载请注明原文地址: https://www.6miu.com/read-1100285.html

最新回复(0)