1 <HTML> 2 <title></title> 3 <body> 4 <p>用for二重循环输出一个3行5列的table.</p> 5 6 <table border="1"> 7 8 <% 9 for (int i = 1; i <= 3; i++) { 10 %> 11 12 <tr> 13 14 <% 15 for (int j = 1; j <= 5; j++) { 16 %> 17 18 <td>nihao</td> 19 <% 20 } 21 %> 22 23 </tr> 24 25 <% 26 } 27 %> 28 29 </table> 30 </body> 31 </HTML>