- 浏览: 230146 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
nujgnef:
[size=x-large][color=yellow][/c ...
Spring中PROPAGATION_REQUIRED的意思? -
wrq_mimi:
...
使用BeanNameAutoProxyCreator实现spring的自动代理 -
Luob.:
不行啊 ,我这里报错了org.springframework. ...
使用BeanNameAutoProxyCreator实现spring的自动代理 -
blueman2012:
附件在哪儿呢,亲亲
Ehcache缓存框架 -
zskangs1126:
mysql 基本语句
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UFT-8" />
<title>jQuery validation plug-in - main demo</title>
<link rel="stylesheet" type="text/css" media="screen" href="http://jquery.bassistance.de/validate/demo/css/screen.css" />
<script src="http://jquery.bassistance.de/validate/lib/jquery.js" type="text/javascript"></script>
<script src="http://jquery.bassistance.de/validate/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$.validator.setDefaults({
submitHandler: function() { alert("submitted!"); }
});
$().ready(function() {
// validate the comment form when it is submitted
$("#commentForm").validate();
// validate signup form on keyup and submit
$("#signupForm").validate({
rules: {
firstname: "required",
lastname: "required",
username: {
required: true,
minlength: 2
},
password: {
required: true,
minlength: 5
},
confirm_password: {
required: true,
minlength: 5,
equalTo: "#password"
},
email: {
required: true,
email: true
},
topic: {
required: "#newsletter:checked",
minlength: 2
},
agree: "required"
},
messages: {
firstname: "Please enter your firstname",
lastname: "Please enter your lastname",
username: {
required: "Please enter a username",
minlength: "Your username must consist of at least 2 characters"
},
password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
},
confirm_password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long",
equalTo: "Please enter the same password as above"
},
email: "Please enter a valid email address",
agree: "Please accept our policy"
}
});
// propose username by combining first- and lastname
$("#username").focus(function() {
var firstname = $("#firstname").val();
var lastname = $("#lastname").val();
if(firstname && lastname && !this.value) {
this.value = firstname + "." + lastname;
}
});
//code to hide topic selection, disable for demo
var newsletter = $("#newsletter");
// newsletter topics are optional, hide at first
var inital = newsletter.is(":checked");
var topics = $("#newsletter_topics")[inital ? "removeClass" : "addClass"]("gray");
var topicInputs = topics.find("input").attr("disabled", !inital);
// show when newsletter is checked
newsletter.click(function() {
topics[this.checked ? "removeClass" : "addClass"]("gray");
topicInputs.attr("disabled", !this.checked);
});
});
</script>
<style type="text/css">
#commentForm { width: 500px; }
#commentForm label { width: 250px; }
#commentForm label.error, #commentForm input.submit { margin-left: 253px; }
#signupForm { width: 670px; }
#signupForm label.error {
margin-left: 10px;
width: auto;
display: inline;
}
#newsletter_topics label.error {
display: none;
margin-left: 103px;
}
</style>
</head>
<body>
<h1 id="banner"><a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery Validation Plugin</a> Demo</h1>
<div id="main">
<p>Default submitHandler is set to display an alert into of submitting the form</p>
<form class="cmxform" id="commentForm" method="get" action="">
<fieldset>
<legend>Please provide your name, email address (won't be published) and a comment</legend>
<p>
<label for="cname">Name (required, at least 2 characters)</label>
<input id="cname" name="name" class="required" minlength="2" />
<p>
<label for="cemail">E-Mail (required)</label>
<input id="cemail" name="email" class="required email" />
</p>
<p>
<label for="curl">URL (optional)</label>
<input id="curl" name="url" class="url" value="" />
</p>
<p>
<label for="ccomment">Your comment (required)</label>
<textarea id="ccomment" name="comment" class="required"></textarea>
</p>
<p>
<input class="submit" type="submit" value="Submit"/>
</p>
</fieldset>
</form>
<form class="cmxform" id="signupForm" method="get" action="">
<fieldset>
<legend>Validating a complete form</legend>
<p>
<label for="firstname">Firstname</label>
<input id="firstname" name="firstname" />
</p>
<p>
<label for="lastname">Lastname</label>
<input id="lastname" name="lastname" />
</p>
<p>
<label for="username">Username</label>
<input id="username" name="username" />
</p>
<p>
<label for="password">Password</label>
<input id="password" name="password" type="password" />
</p>
<p>
<label for="confirm_password">Confirm password</label>
<input id="confirm_password" name="confirm_password" type="password" />
</p>
<p>
<label for="email">Email</label>
<input id="email" name="email" />
</p>
<p>
<label for="agree">Please agree to our policy</label>
<input type="checkbox" class="checkbox" id="agree" name="agree" />
</p>
<p>
<label for="newsletter">I'd like to receive the newsletter</label>
<input type="checkbox" class="checkbox" id="newsletter" name="newsletter" />
</p>
<fieldset id="newsletter_topics">
<legend>Topics (select at least two) - note: would be hidden when newsletter isn't selected, but is visible here for the demo</legend>
<label for="topic_marketflash">
<input type="checkbox" id="topic_marketflash" value="marketflash" name="topic" />
Marketflash
</label>
<label for="topic_fuzz">
<input type="checkbox" id="topic_fuzz" value="fuzz" name="topic" />
Latest fuzz
</label>
<label for="topic_digester">
<input type="checkbox" id="topic_digester" value="digester" name="topic" />
Mailing list digester
</label>
<label for="topic" class="error">Please select at least two topics you'd like to receive.</label>
</fieldset>
<p>
<input class="submit" type="submit" value="Submit"/>
</p>
</fieldset>
</form>
<h3>Syntetic examples</h3>
<ul>
<li><a href="errorcontainer-demo.html">Error message containers in action</a></li>
<li><a href="custom-messages-metadata-demo.html">Custom Messages as Metadata</a></li>
<li><a href="radio-checkbox-select-demo.html">Radio and checkbox buttons and selects</a></li>
<li><a href="ajaxSubmit-intergration-demo.html">Integration with Form Plugin (AJAX submit)</a></li>
<li><a href="custom-methods-demo.html">Custom methods and message display.</a></li>
<li><a href="dynamic-totals.html">Dynamic forms</a></li>
<li><a href="themerollered.html">Forms styled with jQuery UI Themeroller</a></li>
</ul>
<h3>Real-world examples</h3>
<ul>
<li><a href="milk/">Remember The Milk signup form</a></li>
<li><a href="marketo/">Marketo signup form</a></li>
<li><a href="multipart/">Buy and Sell a House multipart form</a></li>
<li><a href="captcha/">Remote captcha validation</a></li>
</ul>
<h3>Testsuite</h3>
<ul>
<li><a href="../test/">Validation Testsuite</a></li>
</ul>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2623402-1";
urchinTracker();
</script>
</body>
</html>
- js.zip (44.6 KB)
- 下载次数: 29
发表评论
-
ymPrompt消息提示组件4.0版[2009-03-02]DEMO演示及使用简介
2010-10-20 15:15 2113不错的效果弹框提示效果直接CtrlC + CtrlV 了,留着 ... -
DWR中的简单函数
2010-09-06 14:18 1207$("precloneNode1suf" ... -
js回车提交事件
2010-07-07 09:06 8940常常需要捕捉 用户的输入后用回车 提交的事件,而不是用鼠标 ... -
YUI AJAX 跨域 备份
2010-04-16 21:56 1653主题词:YUI AJAX 跨域 一、前言 ... -
Juery getJoson
2010-04-14 23:01 1108备份数据: function ajaxInfo(){ ... -
常用 正则 表达式
2010-04-05 09:57 1011"^\d+$" //非负整数(正整数 + ... -
自己写的Jquery form ajax 事例
2010-03-30 16:48 1504页面:index.jsp <%@ page ... -
jquery技巧总结
2010-03-29 15:56 839jquery技巧总结 一、简介 1.1、概述 随着WEB ... -
concat 方法
2010-03-25 14:11 797concat 方法(String) 返回字符串值,该值包含了 ... -
从jQuery api
2010-03-25 13:48 865自从jQuery面世以来,它以其快速、简洁,能够很轻易地处理H ... -
JS处理JSON数据
2010-03-08 21:43 16231、java将List容器封装的数据转化为JSON数据格式 ... -
JS表单脚本输入验证
2010-02-09 16:20 1238JS表单脚本输入验证 *以下是库函数目录及使用说明: * ... -
javascript面向对象技术基础(二)
2010-01-26 11:05 867数组我们已经提到过,对象是无序数据的集合,而数组则是有序数据的 ... -
javascript面向对象技术基础(一)
2010-01-26 10:24 863看了很多介绍javascript面 ...
相关推荐
jQuery formvalidate表单验证效果,当用户输入不正确时,若点击提交按钮的话,则内容不符合规则的文本框会抖动,以提示用户此项输入有问题,有的把抖动形容为摇晃,无所谓,反正是那一类。本表单验证效果形式新颖,...
jquery.validate.1.9.0.min.js jquery.validate.1.12.0.min.js jquery.validate.1.13.1.min.js jquery.validate.1.16.0.min.js jquery.validate.1.14.0.min.js jquery.validate.1.15.1.min.js jquery.validate....
Jquery validate和form两个插件,完美进行表单验证和Ajax无刷新方式提交form表单,很有用的哦。
jquery-form-validate.1.2.zip jquery表单验证插件.有示例
jQuery form validate plugin,包含jQuery,form,validate JS库和Demo
jQuery Validate 插件依赖 jQuery 库,使用前需要先导入 jQuery的 js 文件,再导入 jquery.validate.js 插件,可以再导入中文提示信息文件 messages_zh.js
jQuery Form Validate 是一个 jQuery 的表单验证插件,支持 HTML5 数据属性的验证。 标签:jQuery
包含Jquery1.6,JqueryUI界面插件,JqueryForm表单异步提交插件,Jqueryvsdoc,VS2008提示插件,JqueryValidate表单验证插件
jquery-validate 可对前端form进行表单校验,文档里详细介绍了如何使用jquery-validate框架和如何扩展验证方法。
Jquery(Validate-Form)使用方法[张振华.Jack]
jquery.validate+jquery.form开发包,可以实现交互友好的form表单验证功能,及异步提交机制。
概述:本篇主要讨论jquery.validate结合jquery.form实现对表单的验证和提交方案。 方式一:是通过jquery.validate的submitHandler选项,即当表单通过验证时执行回调函数。在这个回调函数中通过jquery.form来提交表单...
jquery,validate
在表单提交前的客户端验证比较常见,之前一般都是alert效果不好,有了它,可以直接套用,呵呵,很方便
用的是jquery的validate验证表单插件,资源都给好了,可以直接使用
一.功能效果 二.部分特殊规则 2.1 错误信息位置更改 在表单某选项中增加代码 表单中选项的name> 例如 : 性别必选 ...input type=radio id=male value=m name=sex/>...input type=radio id=female value=f name=sex/&...
jquery的一个插件formValidate,里面包含5个demo还有对demo的解释,每个demo中都有不同的方法去实现校验,具体可打开看源码,就不多解释了反正本人觉得还可以