九九乘法表
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> </head> <body> <script type="text/javascript"> var i=0; var j=0; var str=""; for(i=1;i<=9;i++){ for(j=1;j<=i;j++){ str+=j+'×'+i+'='+j*i+' '; } str+='\n'; } alert(str); </script> </body> </html>