Validform 基于表单验证
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../taglib/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="${ctx}" />
<meta http-equiv="X-UA-Compatible" content="IE=8,IE=9" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript">
var ctx = '${ctx}';
</script>
<title>档案管理新增</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" href="js/common/jquery-ui-1.10.3/themes/base/jquery.ui.all.css" />
<link rel="stylesheet" type="text/css" href="js/common/jPaginate/css/style.css" />
<script src="js/common/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/common/jquery-ui-1.10.3/ui/jquery-ui.js"></script>
<script src="js/common/jquery.cookie.js" type="text/javascript"></script>
<script src="js/common/html5.js" type="text/javascript"></script>
<script src="js/common/Validform_v5.3.2_min.js" type="text/javascript"></script>
<script src="js/common/datepicker/WdatePicker.js" type="text/javascript"></script>
<script src="js/common/jPaginate/jquery.paginate.js" type="text/javascript"></script>
<style type="text/css">
.validnum{
border-color: red;
}
</style>
<script>
$(function() {
$("#tabs").tabs(); $(".infoForm").Validform({
tiptype: function(msg, o, cssctl) {
if (!o.obj.is("form")) {
var objtip = o.obj.siblings(".Validform_checktip");
cssctl(objtip, o.type);
objtip.text(msg);
} else {
var objtip = o.obj.find("#msgdemo");
cssctl(objtip, o.type);
objtip.text(msg);
}
},
showAllError : true,
ajaxPost : true,
callback : function(data) {
if(data.status=="y"){
alert(data.message);
location.href = "ShipInfo/shipInfoListAction.do";
}else{
alert(data.message);
}
}
}); });
</script>
</head>
<body>
<div class="mainright minheight">
<div class="content">
<p class="title">
首页 » <span>档案管理新增</span>
</p>
<span class="line"></span>
<div class="shipdetails">
<form class="infoForm" action="ShipInfo/add_j.do">
<button type="submit">发布</button>
<button type="button" onclick="history.go(-1)">返回</button>
<div id="tabs">
<ul>
<li><a href="ShipInfo/ShipInfo_add.jsp#tabs-1">船舶资料</a></li>
<li><a href="ShipInfo/ShipInfo_add.jsp#tabs-2">船体部分</a></li>
<li><a href="ShipInfo/ShipInfo_add.jsp#tabs-3">吨位</a></li>
<li><a href="ShipInfo/ShipInfo_add.jsp#tabs-4">主机</a></li>
<li><a href="ShipInfo/ShipInfo_add.jsp#tabs-5">船舶所有人</a></li>
<li><a href="ShipInfo/ShipInfo_add.jsp#tabs-6">船舶管理公司</a></li>
<li><a href="ShipInfo/ShipInfo_add.jsp#tabs-7">船舶经营人</a></li>
</ul>
<div id="tabs-1">
<dl>
<dt><label>船名:</label></dt>
<dd><s:textfield name="shipInfo.vesselName" datatype="*"/><font style="color:red;">*</font><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>原船名:</label></dt>
<dd><s:textfield name="shipInfo.origVesselName" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>MMSI:</label></dt>
<dd><s:textfield name="shipInfo.mmsi" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>IMO:</label></dt>
<dd><s:textfield name="shipInfo.imo" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>呼号:</label></dt>
<dd><s:textfield name="shipInfo.callSign"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>船舶类型:</label></dt>
<dd><s:textfield name="shipInfo.subType" datatype="*"/><font style="color:red;">*</font><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>船速:</label></dt>
<dd><s:textfield name="shipInfo.speed" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>船级社:</label></dt>
<dd><s:textfield name="shipInfo.classedBy" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>船籍港:</label></dt>
<dd><s:textfield name="shipInfo.portOfRegistry" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>船籍:</label></dt>
<dd><s:textfield name="shipInfo.origOwner" datatype="*"/><font style="color:red;">*</font><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>原船籍:</label></dt>
<dd><s:textfield name="shipInfo.origCDOwner" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>造船厂:</label></dt>
<dd><s:textfield name="shipInfo.builder" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>造船地点:</label></dt>
<dd><s:textfield name="shipInfo.shipyardCountry" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>造船日期:</label></dt>
<dd><s:textfield name="shipInfo.contractDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd 00:00:00'})" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>安放龙骨日期:</label></dt>
<dd><s:textfield name="shipInfo.keelLaid" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd 00:00:00'})" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>下水日期:</label></dt>
<dd><s:textfield name="shipInfo.launched" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd 00:00:00'})" /><em class="Validform_checktip"></em></dd>
</dl>
<div class="clear"></div>
</div>
<div id="tabs-2">
<ul>
<dl>
<dt><label>船舱数:</label></dt>
<dd><s:textfield name="shipInfo.cabins" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>甲板数:</label></dt>
<dd><s:textfield name="shipInfo.decks" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>总长:</label></dt>
<dd><s:textfield name="shipInfo.loa" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>型深:</label></dt>
<dd><s:textfield name="shipInfo.depth" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>型宽:</label></dt>
<dd><s:textfield name="shipInfo.beam" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>吃水:</label></dt>
<dd><s:textfield name="shipInfo.draft" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>排水量:</label></dt>
<dd><s:textfield name="shipInfo.displacementTonnage" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>冷藏总容量:</label></dt>
<dd><s:textfield name="shipInfo.reeferCapacity" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>冷藏集装箱:</label></dt>
<dd><s:textfield name="shipInfo.reeferTEU" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>翼液货舱:</label></dt>
<dd><s:textfield name="shipInfo.tanksWing" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>液货舱:</label></dt>
<dd><s:textfield name="shipInfo.permanentBallastCapacity" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>中心液货舱:</label></dt>
<dd><s:textfield name="shipInfo.tanksCentre" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>甲板液货舱:</label></dt>
<dd><s:textfield name="shipInfo." /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>污水舱:</label></dt>
<dd><s:textfield name="shipInfo.tanksSlop" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>是否配置原油洗舱:</label></dt>
<dd><s:textfield name="shipInfo.crudeOilWashing" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>是否装有惰性气体:</label></dt>
<dd><s:textfield name="shipInfo.inertGasSystem" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
</ul>
<div class="clear"></div>
</div>
<div id="tabs-3">
<ul>
<dl>
<dt><label>总吨位:</label></dt>
<dd><s:textfield name="shipInfo.grossTonnage" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>载重吨:</label></dt>
<dd><s:textfield name="shipInfo.dwt" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>净吨:</label></dt>
<dd><s:textfield name="shipInfo.cgt" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
</ul>
<div class="clear"></div>
</div>
<div id="tabs-4">
<ul>
<dl>
<dt><label>主机制造商:</label></dt>
<dd><s:textfield name="shipInfo.engineBuilder" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>主机种类:</label></dt>
<dd><s:textfield name="shipInfo.engineMake" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>主机型号:</label></dt>
<dd><s:textfield name="shipInfo.engineModel" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>主机速率:</label></dt>
<dd><s:textfield name="shipInfo.engineRPM" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>主机性能:</label></dt>
<dd><s:textfield name="shipInfo.engineSpeed" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>主机燃料:</label></dt>
<dd><s:textfield name="shipInfo.engineType" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>主机总功率:</label></dt>
<dd><s:textfield name="shipInfo.engineHPTotal" datatype="n" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
</ul>
<div class="clear"></div>
</div>
<div id="tabs-5">
<ul>
<dl>
<dt><label>公司:</label></dt>
<dd><s:textfield name="addressandrep.companyName" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>邮编:</label></dt>
<dd><s:textfield name="addressandrep.postalCode" datatype="p" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>电话:</label></dt>
<dd><s:textfield name="addressandrep.telephone" datatype="ph" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>传真:</label></dt>
<dd><s:textfield name="addressandrep.facsimile" datatype="f" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>邮箱:</label></dt>
<dd><s:textfield name="addressandrep.emailNetwork" datatype="e" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>网址:</label></dt>
<dd><s:textfield name="addressandrep.line1LabelAddress" datatype="url" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人:</label></dt>
<dd><s:textfield name="shipInfo.owner" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人船籍:</label></dt>
<dd><s:textfield name="addressandrep." /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人电话:</label></dt>
<dd><s:textfield name="addressandrep." datatype="m" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人邮箱:</label></dt>
<dd><s:textfield name="addressandrep." datatype="e" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人邮编:</label></dt>
<dd><s:textfield name="addressandrep." datatype="p" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
</ul>
<div class="clear"></div>
</div>
<div id="tabs-6">
<ul>
<dl>
<dt><label>公司:</label></dt>
<dd><s:textfield name="addressandrep1.companyName" datatype="*"/><font style="color:red;">*</font><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>邮编:</label></dt>
<dd><s:textfield name="addressandrep1.postalCode" datatype="p" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>电话:</label></dt>
<dd><s:textfield name="addressandrep1.telephone" datatype="ph" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>传真:</label></dt>
<dd><s:textfield name="addressandrep1.facsimile" datatype="f" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>邮箱:</label></dt>
<dd><s:textfield name="addressandrep1.emailNetwork" datatype="e" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>网址:</label></dt>
<dd><s:textfield name="addressandrep1.line1LabelAddress" datatype="url" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人:</label></dt>
<dd><s:textfield name="shipInfo.manager" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人电话:</label></dt>
<dd><s:textfield name="addressandrep1." datatype="m" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人邮箱:</label></dt>
<dd><s:textfield name="addressandrep1." datatype="e" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
</ul>
<div class="clear"></div>
</div>
<div id="tabs-7">
<ul>
<dl>
<dt><label>公司:</label></dt>
<dd><s:textfield name="addressandrep2.companyName" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>邮编:</label></dt>
<dd><s:textfield name="addressandrep2.postalCode" datatype="p" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>电话:</label></dt>
<dd><s:textfield name="addressandrep2.telephone" datatype="ph" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>传真:</label></dt>
<dd><s:textfield name="addressandrep2.facsimile" datatype="f" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>邮箱:</label></dt>
<dd><s:textfield name="addressandrep2.emailNetwork" datatype="e" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>网址:</label></dt>
<dd><s:textfield name="addressandrep2.line1LabelAddress" datatype="url" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人:</label></dt>
<dd><s:textfield name="shipInfo.operator" /><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人电话:</label></dt>
<dd><s:textfield name="addressandrep2." datatype="m" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
<dl>
<dt><label>联系人邮箱:</label></dt>
<dd><s:textfield name="addressandrep2." datatype="e" ignore="ignore"/><em class="Validform_checktip"></em></dd>
</dl>
</ul>
<div class="clear"></div>
</div>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
Validform 基于表单验证的更多相关文章
- SharePoint2010基于表单验证方法总结(转载)
系统环境: win2008r2+ sql2008r2 +Visual Studio2010+sharepoint 2010 A.如果已经建立了web application 例如名字为: http: ...
- 基于jQuery的Validate表单验证
表单验证可以说在前端开发工作中是无处不在的~ 有数据,有登录,有表单, 都需要前端验证~~ 而我工作中用到最多的就是基于基于jQuery的Validate表单验证~ 就向下面这样~ 因为今天有个朋 ...
- Validform表单验证总结
近期项目里用到了表单的验证,选择了Validform_v5.3.2. 先来了解一下一些基本的参数: 通用表单验证方法:Demo: $(".demoform").Validform( ...
- Validform —— 再也不用担心“表单验证”!
<!doctype html> <html> <head> <meta content="text/html" charset=" ...
- 【jquery】Validform,一款不错的 jquery 表单验证插件
关于 Validform 这是一款很不错的 jquery 表单验证插件,它几乎能够满足任何验证需求,仅仅一行代码就能搞定整站的表单验证. $('form').Validform(); 为什么能如此方便 ...
- 表单验证之validform.js使用方法
一.validform有什么用? 网页上有大量的input需要你进行验证的时候,如果是弹窗的话,需要不停地判断,如果为空,弹窗.如果不是数字,弹窗. 所以要将这么多验证交给一个js去验证. 二.我现在 ...
- Validform:一行代码搞定整站的表单验证!
表单验证不再发愁,http://validform.rjboy.cn/
- 基于Jquery Validate 的表单验证
基于Jquery Validate 的表单验证 jquery.validate.js是jquery下的一个验证插件,运用此插件我们可以很便捷的对表单元素进行格式验证. 在讲述基于Jquery Vali ...
- 一个PHP常用表单验证类(基于正则)
一个基于正则表达式的PHP常用表单验证类,作者:欣然随风.这个表单判断类的功能有:验证是否为指定长度的字母/数字组合.验证是否为指定长度汉字.身 份证号码验证.是否是指定长度的数字.验证邮件地址.电话 ...
随机推荐
- apache CXF quickstart
1下载 官网: cxf.apache.org 下载 CXF 的开发包: 解压上面的 zip 文件 : 2介绍 1什么是cxf Apache CXF™ is an open source service ...
- 请以excel管理你的接口测试用例
闲话休扯,上需求:自动读取.执行excel里面的接口测试用例,测试完成后,返回错误结果并发送邮件通知. 分析: 1.设计excel表格2.读取excel表格3.拼接url,发送请求4.汇总错误结果.发 ...
- matlab实现M/M/1排队系统
Matlab实现. 分为主函数 MyLine 和被调用函数 Func. 主函数 MyLine 实现在 Func 函数的基础上实现序贯法, 将平均等待队长作为每次模拟的 X,求出置信区间.Func 函数 ...
- pat02-线性结构1. Reversing Linked List (25)
02-线性结构1. Reversing Linked List (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, ...
- vim代码折叠命令
1. 折叠方式 可用选项 'foldmethod' 来设定折叠方式:set fdm=*****. 有 6 种方法来选定折叠: manual 手工定义折叠 ind ...
- File类--随笔
package io; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; im ...
- spring+springmvc+mybatis 开发JAVA单体应用
myshop 概述 myshop项目是根据视频教程 Java 单体应用 做的一个练习项目,目前完成了登录功能.用户管理.类别管理后续有时间会继续做其它的功能.趁着双11花了99元一年买了台阿里云服务器 ...
- 一、IP地址
IP地址 1)网络地址 IP地址由网络号(包括子网号)和主机号组成,网络地址的主机号为全0,网络地址代表着整个网络. 2)广播地址 广播地址通常称为直接广播地址,是为了区分受限广播地址. 广播地址与网 ...
- -ms-zoom property
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 从零开始的全栈工程师——MySQL数据库( Dos命令 ) ( phpstudy )
MySQL是一个关系型数据库,存在表的概念.结构,数据库可以存放多张表,每个表里可以存放多个字段,每个字段可以存放多个记录. phpstudy使用终端打开数据库的命令行 密码: root 数据库 查看 ...