zoukankan      html  css  js  c++  java
  • jsp

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    
    <html>
    
    <head>
    
    <title>My JSP 'index.jsp' starting page</title>
    
    <link rel="stylesheet" type="text/css" href="styles.css">
    
    <style>
    
        table{
    
            500px;
    
            height:300px;
    
            text-align:center
    
        }
    
    </style>
    
    </head>
    
    <%!int i, j;%>
    
    <body>
    
    <h3>for二重循环输出一个3行5列的table</h3>
    
        <table border="1" cellpadding="0" cellspacing="0">
    
            <%
    
                for(i=1;i<=3;i++){
    
             %>
    
             <tr>
    
                 <%
    
                     for(j=1;j<=5;j++){
    
                  %>
    
                      <td>table</td>
    
                  <%
    
                      }
    
                   %>
    
             </tr>
    
             <%
    
                 }
    
              %>
    
        </table>
    
    </body>
    
    </html>

  • 相关阅读:
    dom操作
    今天学到的知识点
    3.26随笔
    dom操作
    Ajax
    JSP、EL、JSTL
    Cookie和Session
    HttpServletResponse
    Servlet
    tomcat
  • 原文地址:https://www.cnblogs.com/wudongyang521/p/14537050.html
Copyright © 2011-2022 走看看