zoukankan      html  css  js  c++  java
  • JSP第二次

    利用Java程序片,用for二重循环输出一个3行5列的table

     1 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
     2 <%
     3     String path = request.getContextPath();
     4     String basePath = request.getScheme() + "://"
     5             + request.getServerName() + ":" + request.getServerPort()
     6             + path + "/";
     7 %>
     8 
     9 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    10 <html>
    11 <head>
    12 <base href="<%=basePath%>">
    13 
    14 <title>My JSP 'index.jsp' starting page</title>
    15 <meta http-equiv="pragma" content="no-cache">
    16 <meta http-equiv="cache-control" content="no-cache">
    17 <meta http-equiv="expires" content="0">
    18 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    19 <meta http-equiv="description" content="This is my page">
    20 <!--
    21     <link rel="stylesheet" type="text/css" href="styles.css">
    22     -->
    23 </head>
    24 
    25 <body>
    26     <%--利用Java程序片,用for二重循环输出一个3行5列的table--%>
    27     <%!int i, j;%>
    28     <table border="1" width="30" height="30" bordercolor=black>
    29         <%
    30             for (i = 1; i <= 3; i++) {
    31         %>
    32         <tr>
    33             <%
    34                 for (j = 1; j <= 5; j++) {
    35             %>
    36             <td>table:我是一个标题</td>
    37             <%
    38                 }
    39             %>
    40         </tr>
    41         <%
    42             }
    43         %>
    44     </table>
    45 </body>
    46 </html>

  • 相关阅读:
    QPushButton设置背景图片,设置背景透明度
    QMessageBox 弹窗提示总结
    Qt中 QObject * sender() const的用法
    Java获取文件后缀
    Qt QLabel设置背景色
    Qt 设置程序图标
    程序猿 tensorflow 入门开发及人工智能实战
    Github + Hexo 搭建博客
    Linux常用命令
    深度学习路线记录
  • 原文地址:https://www.cnblogs.com/qq1123514689/p/14513605.html
Copyright © 2011-2022 走看看