九九乘法表输出+系统时间输出

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/qq_42177478/article/details/89976160

index.jsp

<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/4/17 0017
  Time: 上午 11:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>$Ti</title>
</head>
<body>
<h1>九九乘法表输出</h1>
<table border = "1">
  <%
    Date date = new Date();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    String sDate = sdf.format(date);
  %>
  当前系统时间:<%=sDate%>
  <%
    for(int i = 1;i<10;i++){%>
  <tr>
    <%
      for(int j = 1;j<=i;j++){%>
    <td style = border:1px solid black>
     <%=j%>*<%=i%>=<%=i*j%>

    </td>
    <%}%>
  </tr>
  <%}%>
</table>

</body>
</html>

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_42177478/article/details/89976160
今日推荐