Home >php教程 >PHP开发 >A simple example of jsp outputting multiplication table

A simple example of jsp outputting multiplication table

高洛峰
高洛峰Original
2016-12-29 15:40:332145browse

<%  String st = "";
   for(int i = 1; i <= 9; i++){
     for(int j = 1; j <= i; j++){
       st += j+"x"+i+"="+i*j;
       st += "  ";
     }
     st += "<br>";
   }
%>
<table width="400" height="200" cellpadding="0" cellspacing="0" border="1" bordercolor="red" bgcolor="blue" >
  <tr bgcolor="yellow">
  <td height="40" align="center">九九乘法表</td></tr>
  <tr>
  <td rowspan="4"><%= "<br>" + st %></td></tr>

A simple example of jsp outputting multiplication table

The above is the simple example of JSP output multiplication table brought by the editor. I hope everyone will support the PHP Chinese website~

More For related articles on a simple example of outputting multiplication tables from multiple jsps, please pay attention to the PHP Chinese website!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn