Response.Write("<table>");
for (int i = 0; i <= 2; i++)
{
Response.Write("<tr>");
for (int x = 0; x <= 2; x++)
{
Response.Write("<td>" + str[i, x].ToString() + "</td>");
}
Response.Write("</tr>");
}
Response.Write("</table>");
方法三:
int[][] intx = new int[2][];
intx[0] = new int[] { 1, 2, 3, 4 };
intx[1] = new int[] { 5, 6, 7, 8 };
Response.Write("<table>");
for (int i = 0; i < 2; i++)
{
Response.Write("<tr>");
for (int x = 0; x < 4; x++)
{
Response.Write("<td>" + intx[i][x].ToString() + "</td>");