zoukankan      html  css  js  c++  java
  • 蜗牛—JSP学习乘法表页面输出

    <%@page import="java.text.SimpleDateFormat" pageEncoding="utf-8"%>
    <%@ page language="java" import="java.util.*"
    	contentType="text/html; charset=utf-8"%>
    <%
    	String path = request.getContextPath();
    	String basePath = request.getScheme() + "://"
    			+ request.getServerName() + ":" + request.getServerPort()
    			+ path + "/";
    %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'show_date.jsp' starting page</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    	<link rel="stylesheet" type="text/css" href="styles.css">
    	-->
    
    </head>
    
    <body>
    
    	<!-- 实现撒旦撒旦 -->
    	<%--sssasddsadas --%>
    
    	<%--
    		String dateStr = "";
    		Date date = new Date();
    		SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
    				"yyyy-MM-dd");
    		dateStr = simpleDateFormat.format(date);
    		String str = fmtDate(new Date());
    	--%>
    
    	<%--!String temp = "";
    
    	public String fmtDate(Date date) {
    		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    		String dateStr = simpleDateFormat.format(date);
    		return dateStr;
    	}--%>
    	<table>
    		<%
    			for (int i = 1; i <= 9; i++) {
    		%>
    		<tr>
    			<%
    				for (int j = 1; j <= i; j++) {
    			%>
    			<td><%=i%>*<%=j%>=<%=i * j%></td>
    			<%
    				}
    			%>
    		</tr>
    		<%
    			}
    		%>
    	</table>
    	<div id="show_date"></div>
    </body>
    </html>
    

    版权声明:本文博主原创文章,博客,未经同意不得转载。

  • 相关阅读:
    VB6之GDI+加载PNG图片
    VB6之阴影图层
    VB6之截图
    VB6之调整任务栏按钮的位置
    恐怖的ifdown eth0;0
    VB6之WM_COPYDATA
    删除整个链表
    digest 词根 gest
    new和delete
    static, const
  • 原文地址:https://www.cnblogs.com/mengfanrong/p/4881779.html
Copyright © 2011-2022 走看看