实例
<html> <head> <title>九九乘法表</title> <!--有事,有项目一起交流,q821642832 --> </head> <body> <style type="text/css"> body{ margin: 60px 0 0 60px; } .jiu{ border: 1px solid #333; width: 100px; height: 30px; font: 18px/30px "courier new"; line-height: 30px; text-align: center; display: inline-block; margin: 5px; } </style> <div id="lizhili"> </div> <script type="text/javascript"> var c=''; for(var a=1;a<10;a++){ for(var b=1;b<=a;b++){ c+='<div class="jiu">'+a+'*'+b+'='+a*b+'</div>'; if(a==b){ c+='<br>'; } } } document.getElementById("lizhili").innerHTML=c; </script> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例