📄 clock_0002ejsp_jsp.java
字号:
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class clock_0002ejsp_jsp extends HttpJspBase {
static {
}
public clock_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/clock.jsp";from=(0,49);to=(58,36)]
out.write("\r\n<html>\r\n<head>\r\n<base target=\"_self\">\r\n<style>\r\n<!--body, p, td, input { color:black;font-size: 12pt }-->\r\n</style>\r\n<script language=\"JavaScript\">\r\nvar timerID = null\r\nvar timerRunning = false\r\nfunction MakeArray(size) {\r\n this.length = size;\r\n for(var i = 1; i <= size; i++)this[i] = \"\";\r\n return this;\r\n}\r\nfunction stopclock (){\r\n if(timerRunning)\r\n clearTimeout(timerID);\r\n timerRunning = false\r\n}\r\nfunction showtime (){\r\n var now = new Date();\r\n var year = now.getYear();\r\n var month = now.getMonth() + 1;\r\n var date = now.getDate();\r\n var hours = now.getHours();\r\n var minutes = now.getMinutes();\r\n var seconds = now.getSeconds();\r\n var day = now.getDay();\r\n Day = new MakeArray(7);\r\n Day[0]=\"星期天\";\r\n Day[1]=\"星期一\";\r\n Day[2]=\"星期二\";\r\n Day[3]=\"星期三\";\r\n Day[4]=\"星期四\";\r\n Day[5]=\"星期五\";\r\n Day[6]=\"星期六\";\r\n var timeValue = \"\";\r\n timeValue += year + \"年\";\r\n timeValue += ((month < 10) ? \"0\" : \"\") + month + \"月\";\r\n timeValue += date + \"日 \";\r\n timeValue += (Day[day]) + \" \";\r\n timeValue += ((hours <= 12) ? hours : hours - 12);\r\n timeValue += ((minutes < 10) ? \":0\" : \":\") + minutes;\r\n timeValue += ((seconds < 10) ? \":0\" : \":\") + seconds;\r\n timeValue += (hours < 12) ? \" 上午\" : \" 下午\";\r\n document.all.clock.innerText = timeValue;\r\n timerID = setTimeout(\"showtime()\",1000);\r\n timerRunning = true\r\n}\r\nfunction startclock () {\r\n stopclock();\r\n showtime()\r\n}\r\n</script>\r\n</head>\r\n<body bgcolor=orange topmargin=\"0\" leftmargin=\"0\" onLoad=\"startclock()\">\r\n<table border=1 cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\" height=\"100%\">\r\n <tr align=center><td align=center>");
// end
// begin [file="/clock.jsp";from=(58,39);to=(58,79)]
out.print((String)session.getAttribute("truename"));
// end
// HTML // begin [file="/clock.jsp";from=(58,81);to=(63,0)]
out.write(",您好!</td></tr>\r\n <tr><td id=\"clock\"></td></tr>\r\n</table>\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -