1. 自定义验证--成功提示



1) 添加选项

  1. errorClass: "unchecked"
  2. validClass: "checked"
  3. errorElement: "span"
  4. errorPlacement: function error element {
  5. if element.parent().find"span[for=""" + element.attr"id" + """]" != null {
  6. element.parent().find"span[for=""" + element.attr"id" + """]").remove();
  7. }
  8. error.appendToelement.parent());
  9. },
  10. success: function label {
  11. label.removeClass"unchecked").addClass"checked");
  12. },

2)设置样式

  1. input.unchecked{border: 1px E6594E dotted;}
  2. span.checked {
  3. padding: 3px 5px 3px 21px;margin-left: 10px;margin-top: 0px;margin-bottom: 3px;adisplay: inline;
  4. height: 25px;line-height: 1px;font-size: 12px;aborder: 1px solid E6594E;white-space: nowrap;
  5. text-align: left;color: E6594E;background:url"/Common/Sys/Cfg/images/checked.gif" no-repeat 3px;/* #FCEAE8 */
  6. }
  7. span.unchecked {
  8. padding: 3px 5px 3px 21px;margin-left: 10px;margin-top: 0px;margin-bottom: 3px;adisplay: inline;
  9. height: 25px;line-height: 1px;font-size: 12px;border: 1px solid E6594E;white-space: nowrap;
  10. text-align: left;color: E6594E;background: FCEAE8 url"/Common/Sys/Cfg/images/unchecked.gif" no-repeat 3px;
  11. }

2. 自定义验证--择要提示



1) 添加选项

  1. errorContainer: container
  2. errorLabelContainer: $"ul" container),
  3. wrapper: ""li""
  4. meta: "validate"
  5. errorClass: "unchecked"
  6. validClass: "checked"

2) 设置样式

  1. input.unchecked{border: 1px E6594E dotted;}
  2. span.checked {
  3. padding: 3px 5px 3px 21px;margin-left: 10px;margin-top: 0px;margin-bottom: 3px;adisplay: inline;
  4. height: 25px;line-height: 1px;font-size: 12px;aborder: 1px solid E6594E;white-space: nowrap;
  5. text-align: left;color: E6594E;background:url"/Common/Sys/Cfg/images/checked.gif" no-repeat 3px;/* #FCEAE8 */
  6. }
  7. span.unchecked {
  8. padding: 3px 5px 3px 21px;margin-left: 10px;margin-top: 0px;margin-bottom: 3px;adisplay: inline;
  9. height: 25px;line-height: 1px;font-size: 12px;border: 1px solid E6594E;white-space: nowrap;
  10. text-align: left;color: E6594E;background: FCEAE8 url"/Common/Sys/Cfg/images/unchecked.gif" no-repeat 3px;
  11. }
  12. div.container {
  13. background-color: eee;
  14. border: 1px solid red;
  15. margin: 5px;
  16. padding: 5px;
  17. }
  18. div.container ol li {
  19. list-style-type: disc;
  20. margin-left: 20px;
  21. }
  22. div.container { display: none }
  23. .container label.error {
  24. display: inline;
  25. }

3) 添加择要标识表记标帜

  1. <div class="container">
  2. <h4>There are serious errors in your form submission, please see below for details.</h4>
  3. <ul></ul>
  4. </div>

jquery.validate自定义验证--成功提示与择要提示的更多相关文章

  1. 扩展jquery.validate自定义验证,自定义提示,本地化

    <!DOCTYPE html> <html> <head> <meta name="viewport" content="wid ...

  2. jquery validate 自定义验证方法

    query validate有很多验证规则,但是更多的时候,需要根据特定的情况进行自定义验证规则. 这里就来聊一聊jquery validate的自定义验证. jquery validate有一个方法 ...

  3. jquery validate 自定义验证方法 日期验证

    jquery validate有很多验证规则,但是更多的时候,需要根据特定的情况进行自定义验证规则. 这里就来聊一聊jquery validate的自定义验证. jquery validate有一个方 ...

  4. Jquery Validate自定义验证规则,一个汉字等于两个字符长度

    使用Jquery validate时写的一些东西,在这里做个笔记 在使用 Jquery validate 的minlength和maxlength进行文本框内容长度验证的时候,对于一个汉字的长度检测结 ...

  5. Jquery validate自定义验证

    http://www.runoob.com/jquery/jquery-plugin-validate.html addMethod(name,method,message)方法 参数 name 是添 ...

  6. jQuery Validate自定义验证方法实现方式

    对应调用函数: ( 可以在内部写js/或者外部引入-我是外部引入的文件 )  validate.expand.js // JavaScript Document //检测手机号是否正确 jQuery. ...

  7. 1)jquery validate 远程验证remote,自定义验证 , 手机号验证 2)bootstrap validate 远程remote验证的方法.

    1)jquery  validate 远程验证remote,自定义验证 1-1: js <script src="YYFramework/Public/js/jquery-3.1.1. ...

  8. jQuery Validate自定义各种验证方法(转)

    一.封装自定义验证方法-validate-methods.js /***************************************************************** j ...

  9. jq.validate 自定义验证两个日期

    jq.validate 自定义验证两个日期 首先定义有一个表单,date1和date2是属于表单的元素,若date1大于date2,返回false:若date1<date2,返回true.使用j ...

随机推荐

  1. 浅谈如何删除JSP编译后的空行

    当你在客户端用view source看JSP生成的代码时,会发现有很多空行,他们是由< %...% >后的回车换行而生成的,也就是说每一行由< %...% >包含的JSP代码到 ...

  2. tflearn 中文汉字识别,训练后模型存为pb给TensorFlow使用——模型层次太深,或者太复杂训练时候都不会收敛

    tflearn 中文汉字识别,训练后模型存为pb给TensorFlow使用. 数据目录在data,data下放了汉字识别图片: data$ ls0  1  10  11  12  13  14  15 ...

  3. 【转】看C++文档的小知识

    转载:http://www.ggv.com.cn/forum/clib/ctype/isspace.html 函数isspace 原型:extern int isspace(int c);    用法 ...

  4. node之get与post

    Get获取内容: var http=require('http'), util=require('util'),//util 提供常用函数集合 url=require('url'); http.cre ...

  5. raspberry安装go

    参考官方文档:https://golang.org/doc/install/source (因为被墙)可以看国内地址: http://godoc.golangtc.com/doc/install/so ...

  6. HTML5/jQuery雷达动画图表 图表配置十分简单

    1.HTML5/jQuery雷达动画图表 图表配置十分简单 之前我们介绍过不少形形色色的HTML5图表了,像这款HTML5折线图表Aristochart是一款很不错的折线图表,这款HTML5 Canv ...

  7. shell脚本函数与数组

    前言 之前写过一篇关于shell脚本流程控制总结,这次继续写关于shell脚本的问题.本篇文章主要包含shell脚本中的函数以及数组的用法介绍.同时也涵盖了一些字符串处理以及shell脚本比较使用的小 ...

  8. ASP.NET页面执行顺序

    原文地址:http://blog.csdn.net/a497785609/article/details/4510335 1.对象初始化(OnInit方法) 页面中的控件(包括页面本身)都是在它们最初 ...

  9. SQL Server知识详解

    1.SET NOCOUNT ON的作用: 作用:阻止在结果集中返回显示受T-SQL语句或则usp影响的行计数信息. 语法:SET NOCOUNT {ON | OFF} 详解:当SET ONCOUNT ...

  10. 1118 Birds in Forest (25 分)

    Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in ...