jquery.easyui添加表单验证
来源:互联网 发布:寻找网络兼职 编辑:程序博客网 时间:2024/05/01 14:30
jQuery EasyUI是一组基于jQuery的UI插件集合体,而jQuery EasyUI的目标就是帮助web开发者更轻松的打造出功能丰富并且美观的UI界面。开发者不需要编写复杂的javascript,也不需要对css样式有深入的了解,开发者需要了解的只有一些简单的html标签。
一、所需资源
二、psgInfoReport.jsp中添加表单验证
<%@ page pageEncoding="UTF-8"%><%@ include file="/common/taglibs.jsp"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>旅客信息统计</title><link href="<c:url value='/styles/easyui.css'/>" type="text/css" rel="stylesheet"> <link href="<c:url value='/styles/icon.css'/>" type="text/css" rel="stylesheet"><script src="<c:url value='/scripts/common.js'/>"></script><script src="<c:url value='/scripts/jquery.js'/>"></script><script src="<c:url value='/scripts/jquery.easyui.min.js'/>"></script><script src="<c:url value='/scripts/easyui-lang-zh_CN.js'/>"></script><script src="<c:url value='/scripts/datePicker/WdatePicker.js'/>" language="javascript"></script><script language="JavaScript" type="text/JavaScript">//导出var exportExcel = function(){if($('#psgInfoSearchForm').form('validate')){//验证通过}else{ return false;}}</script></head><body leftmargin="0" topmargin="0"><%@include file="/common/loading.jsp"%><html:form action="psgInfoSearch.html?method=psgInfoView" method="post" styleId="psgInfoSearchForm"><input type="hidden" id='export'/> <table width="100%" height="100%" border="0" cellpadding="0"cellspacing="0"> <tr><td class="home-content-title"><img src="images/find.png" align="absmiddle" /> 旅客信息统计<font color="red">(起止时间段不能超过5天)</font></td></tr><tr><td height="30" class="home-search-space"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr height="30" class="home-search-space"><td align="right">航班号:</td><td align="left"><input type="text" id="flt_num" value="<c:out value="${psgInfoSearchForm.flt_num}"/>" name="flt_num" class="home-table-inputbox" size="12" maxlength="9"onchange="this.value=this.value.toUpperCase()" /></td><td align="right" nowrap width="10%"><font color="red">*</font>起始日期:</td><td nowrap width="10%"><input name="startDate" id="startDate"class="easyui-validatebox"value="<c:out value="${psgInfoSearchForm.startDate}"/>"onPicked="$('endDate').onfocus();document.getElementById('endDate').value=this.value;"onclick="WdatePicker({maxDate:'%y-%M-{%d}'})" size="11" required="true" missingMessage="起始日期为必填项"/> <img src="images/date.gif" width="16" height="15"onclick="WdatePicker({el:'startDate',maxDate:'%y-%M-{%d}'})" /></td><td align="right" nowrap width="10%"><font color="red">*</font>截止日期:</td><td nowrap width="10%"><input name="endDate" id="endDate" class="easyui-validatebox" value="<c:out value="${psgInfoSearchForm.endDate}" />"onclick="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'#F{$dp.$D(\'startDate\',{M:12});}'})" size="11" required="true" missingMessage="截止日期为必填项"/> <img src="images/date.gif" width="16" height="15"onclick="WdatePicker({el:'endDate',minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'#F{$dp.$D(\'startDate\',{M:12});}'})" /></td> </tr><tr height="30" class="home-search-space"><td align="right">始发站:</td><td align="left"><input type="text" id="orig" name="orig" value="<c:out value="${psgInfoSearchForm.orig}" />" class="home-table-inputbox" size="12" maxlength="9"onchange="this.value=this.value.toUpperCase()" /></td> <td align="right">目的站:</td><td align="left"><input type="text" id="dest" name="dest" value="<c:out value="${psgInfoSearchForm.dest}" />" class="home-table-inputbox" size="12" maxlength="9"onchange="this.value=this.value.toUpperCase()" /></td> <td align=right width="14%">状态:</td> <td width="15%"> <html:select name="psgInfoSearchForm" property="status" size="1" styleId="status"> <html:option value="">全部</html:option> <html:option value="AC">已值机</html:option> <html:option value="NA">未值机</html:option> </html:select> </td> <td > <input name="Submit2" id="queryId" type="button" class="home-inputBtn" value="<fmt:message key="button.search"/>" onclick="search()" accesskey="S" title="按 Alt+S 提交查询"> <input type="button" id="resetId" class="home-inputBtn" name="Submit22" value="<fmt:message key="button.reset"/>" onClick="doReset()"> <p:allow pid="132005"><input type='button' id="exprotId" class="home-inputBtn" value='<fmt:message key="button.export"/>' onclick="exportExcel()" /></p:allow> </td> </tr> </table></td></tr></table></body></html>
三、效果图
0 0
- jquery.easyui添加表单验证
- jquery easyui 表单验证
- jquery easyui 表单验证
- jquery easyui 表单验证
- jQuery easyui表单验证
- JQuery EasyUI表单-表单验证
- Jquery easyUi表单验证提交
- jquery-easyui中的表单验证
- Jquery插件easyUi表单验证提交
- Jquery插件easyUi表单验证提交
- 扩展jQuery EasyUI 的表单验证
- easyui jquery 自定义表单验证 异步 后台
- jQuery EasyUI使用教程之表单验证
- jquery EasyUI 提交表单前验证格式
- jQuery easyui validatebox 添加验证类型
- jQuery easyui validatebox 添加验证类型2
- jQuery validate 添加表单验证方法
- jQuery表单验证添加数据删除数据
- Maven - Introduction to the Build Lifecycle
- xcode6更新证书错误:No matching provisioning profiles found 解决方案
- libevent总结(中)
- ScrollView 中使用 AutoLayout
- 配置nginx支持php,jsp,asp,aspx
- jquery.easyui添加表单验证
- 欢迎使用CSDN-markdown编辑器
- WIN32汇编 状态栏的使用
- cnn中关于平均池化和最大池化的理解
- jQuery与JavaScript入门经典——AJAX
- java 日期增加一天
- 09-百思不得姐(第九天)
- HTTP请求方法详解
- Result配置