zoukankan      html  css  js  c++  java
  • 1119整理

     1 <%@ page language="java" contentType="text/html; charset=UTF-8"
     2     pageEncoding="UTF-8"%>
     3 
     4     <%@ page import="java.util.Date" %>
     5     <%@ page import="java.text.SimpleDateFormat" %>
     6 
     7 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     8 <html>
     9 <head>
    10 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    11 <title>Insert title here</title>
    12 </head>
    13 <body>
    14 
    15 <%
    16 
    17 // 声明和实例化了Date对象,获取系统时间
    18 
    19 // 在页面上显示当前时间
    20 // 声明和实例化了一个Date对象
    21 Date date = new Date();
    22 // 格式化日期
    23 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    24 
    25 String dt = sdf.format(date);
    26 
    27 %>
    28 
    29 输出当前时间:<%=dt %>
    30 
    31 <br>
    32 
    33 显示汉字!!!
    34 
    35 </body>
    36 </html>
    View Code
     1 <%@ page language="java" contentType="text/html; charset=UTF-8"
     2     pageEncoding="UTF-8" isErrorPage="true"%>
     3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     4 <html>
     5 <head>
     6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     7 <title>Insert title here</title>
     8 </head>
     9 <body>
    10 页面出错了!
    11 </body>
    12 </html>
    View Code
     1 <%@ page language="java" contentType="text/html; charset=UTF-8"
     2     pageEncoding="UTF-8" errorPage="error.jsp"%>
     3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     4 <html>
     5 <head>
     6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     7 <title>Insert title here</title>
     8 </head>
     9 <body>
    10 网页正文
    11 <br>
    12 <br>
    13 <%@
    14 include file="include.jsp"
    15 %>
    16 
    17 </body>
    18 </html>
    View Code

  • 相关阅读:
    GCD的常用代码块
    多用字面量语法,少用与之等价的方法
    新建项目上下出现黑色块
    按钮UIButton的使用
    集成支付宝
    app生命周期之即将关闭
    苹果开发者计划申请材料准备(公司级)
    真机调试的一些问题记录~更新中
    iOS开发架构学习记录
    用枚举值表示状态、选项、状态码
  • 原文地址:https://www.cnblogs.com/zxw0004/p/4979219.html
Copyright © 2011-2022 走看看