- <%@ page language = "java" import = "java.util.*,java.text.*" contentType = "text/html;charset = utf-8"%>
- <HTML>
- <HEAD>
- <TITLE>输出当前日期</TITLE>
- </HEAD>
- <BODY>
- 你好,A**!今天是
- <%
- SimpleDateFormat formate= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
- String strCurrentTime = formate.format(new Date());
- %>
- <%=strCurrentTime %>
- </BODY>
- </HTML>