39,084
社区成员
发帖
与我相关
我的任务
分享
<%@page contentType="text/html;charset=utf-8" pageEncoding="utf-8" import="java.util.Enumeration"%>
<html>
<head><title>包含页面</title></head>
<body bgcolor=cyan>
<jsp:include page="date.jsp" flush="true">
<jsp:param name="date" value="1"/>
</jsp:include>
</body>
</html>
<%@ page contentType="text/html; charset=utf-8" errorPage="" import="java.util.Calendar" %>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Date</title>
<%!
String disp() {
String date = request.getParameter("date");
out.print(date+"<br />");
if (date!=null)
date = new String(date.getBytes("iso-8859-1"),"utf-8");
else {
date = String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_MONTH));
}
return date;
}
%>
</head>
<body>
<script language="javascript">
var today = new Date();
document.write(today.getFullYear(),"年",today.getMonth()+1,"月",<%=disp()%>,"日");
</script>
</body>
</html>