jsp输出九九乘法表

 1 <%   String st = "";
 2      for(int i = 1; i <= 9; i++){
 3          for(int j = 1; j <= i; j++){
 4              st += j+"x"+i+"="+i*j;
 5              st += "&nbsp;&nbsp;";
 6          }
 7          st += "<br>";
 8      }
 9 %>
10 <table width="400" height="200" cellpadding="0" cellspacing="0" border="1" bordercolor="red" bgcolor="blue" >
11     <tr bgcolor="yellow">
12     <td height="40" align="center">九九乘法表</td></tr>
13     <tr>
14     <td rowspan="4"><%= "<br>" + st %></td></tr>

posted @ 2016-06-23 07:49  唐枫  阅读(391)  评论(0编辑  收藏  举报