⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchpolltop.jsp

📁 近几年来
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" pageEncoding="gb2312" isELIgnored="false"%>
<%@ page import="java.util.Calendar,java.text.SimpleDateFormat"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:useBean id="allClasses" class="java.util.TreeMap"
	scope="application" />
<jsp:useBean id="allCourse" class="java.util.TreeMap"
	scope="application" />
<jsp:useBean id="allTeacher" class="java.util.TreeMap"
	scope="application" />
<fieldset style="width: 100%;padding: 2"><legend style="font-size: 10pt">请选择:</legend>
<table border="0" align="center">
	<tr>
		<td>班级:</td>
		<td><select name="classesID">
			<option value="">所有班级</option>
			<logic:iterate id="classes" collection="<%=allClasses.values()%>">
				<option value="<bean:write name="classes" property="id"/>"><bean:write
					name="classes" property="name" /></option>
			</logic:iterate>
		</select></td>
		<td>课程:</td>
		<td><select name="courseID">
			<option value="">所有课程</option>
			<logic:iterate id="course" collection="<%=allCourse.values()%>">
				<option value="<bean:write name="course" property="id"/>"><bean:write
					name="course" property="name" /></option>
			</logic:iterate>
		</select></td>
		<td>老师:</td>
		<td><select name="teacherID">
			<option value="">所有老师</option>
			<logic:iterate id="teacher" collection="<%=allTeacher.values()%>">
				<option value="<bean:write name="teacher" property="id"/>"><bean:write
					name="teacher" property="name" /></option>
			</logic:iterate>
		</select></td>
		<%
		SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
		Calendar c = Calendar.getInstance();
%>
		<td>时间:</td>
		<td><input type="hidden" name="startDate"
			value="<%=df.format(c.getTime())%>"> <input type="text" disabled
			maxLength="10" size="10" name="labelStartDate"
			value="<%=df.format(c.getTime())%>"></td>
		<td><img style="CURSOR: hand" onclick="GetDate (1)"
			src="../images/sel_date.gif" border="0" name="btnAct"></td>
		<td>至</td>

		<td><input type="hidden" name="endDate"
			value="<%=df.format(c.getTime())%>"> <input disabled type="text"
			maxLength="10" size="10" name="labelEndDate"
			value="<%=df.format(c.getTime())%>"></td>
		<td><img style="CURSOR: hand" onclick="GetDate (2)"
			src="../images/sel_date.gif" border="0" name="btnAct0"></td>
		<td><select name="orderby">
			<option value="desc">按时间降序</option>
			<option value="asc">按时间升序</option>
		</select></td>
		<td>&nbsp;&nbsp;</td>
		<td><input type="button" name="b1" value="搜索" onclick="QueryRecord()" /></td>
	</tr>
</table>
</fieldset>
<SCRIPT language=javascript>

function GetDate (nText)
{
  reVal = window.showModalDialog ("../day.htm", '',"status:no;center:yes;scroll:no;resizable:no;help:no;dialogWidth:255px;dialogHeight:260px");
  if (reVal != null)
  {
    if (nText == 1) {
      document.pollForm.labelStartDate.value = reVal;
      document.pollForm.startDate.value = reVal;
	}      
    if (nText == 2) {
      document.pollForm.labelEndDate.value = reVal;
      document.pollForm.endDate.value = reVal;
    }      
  };
};

function QueryRecord ()
{
    if (document.pollForm.labelStartDate.value != "" && document.pollForm.labelEndDate.value != "" && (Date.parse(document.pollForm.labelStartDate.value) > Date.parse(document.pollForm.labelEndDate.value)))
    {
            alert("超始日期大于终止日期!");
            return;
    }

	document.pollForm.submit();
}
</SCRIPT>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -