📄 usingdateformat.jsp
字号:
<%@page contentType="text/html"%>
<%@page pageEncoding="GB2312"%>
<%@page import = "java.util.*,java.text.*"%>
<html>
<head><title>改变日期时间的输出格式</title></head>
<body>
您好,现在时间为:<br>
<%
Date date = new Date();
Locale locale = new Locale("zh","CN","");
DateFormat type =DateFormat.getDateTimeInstance
(DateFormat.LONG,DateFormat.LONG,locale.CHINESE);
out.println(type.format(date));
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -