验证信息小知识
来源:互联网 发布:购买的淘宝店铺安全吗 编辑:程序博客网 时间:2024/06/07 06:18
1,css的简单写法:
var categoryInfo = $("<span>").css("color","red").
css("margin","7px 0 0 5px")
2,另外一种写法:
var categoryInfo = $("<span>").css({
color:red;
margin:7px 0 0 5px;
).
3,验证信息中加入图片
var categoryInfo = $("<span>").css({
color:red;
margin:7px 0 0 5px;
background: url(../../images/common/err-ico.gif) no-repeat 0 0;
).
4,jq的validate验证中的条件验证sendTime3 : {
required : function(){
var temp=document.getElementsByName("sendType");
for (i=0;i<temp.length;i++){ if(temp[i].checked) {
if(i == 2)
return true;
}
}
return false;
}
},
5,验证信息正确位置显示
errorClass : 'err-tip',errorElement : 'p',ignore : '.not-checked',errorPlacement : function(error, element) {if (element.parent().hasClass('jqTransformSelectWrapper')) {element.parents('.jqtransform-select3').after(error);} else if (element.get(0).tagName.toLowerCase() == 'textarea') {element.parent().append(error.css({float : 'none',display : 'inline-block'}));}else if(element.is(':radio') ) { element.parent().append(error.css({float : 'none',display : 'inline-block'}));} else {element.parent().append(error.css({float : 'none',display : 'inline-block'}));}
0 0
- 验证信息小知识
- 信息小知识
- struts2--(3)--一些小的知识---简单数据验证信息回显问题
- Drupal 字段验证小知识
- JavaWEB小知识学习--验证码生成
- 【信息安全】一些数论小知识
- 搜集的js验证小知识(表单验证)
- 小知识
- 小知识
- 小知识
- 小知识
- 小知识
- 小知识
- 小知识
- 小知识
- 小知识
- 小知识
- 小知识
- Error: java.lang.UnsupportedOperationException: Not implemented by the HftpFileSystem FileSystem imp
- GPS数据读取与处理(一)
- namesrv
- nyoj 288 士兵杀敌(五)
- "mkimage" command not found - U-Boot images will not be built
- 验证信息小知识
- LZ77编码算法
- php 数据处理之取整,四舍五入
- java 正则表达式
- css 加载字体
- 堆排序原理及算法实现(最大堆)
- 各地图坐标系转换(WGS84坐标系,GCJ02坐标系,BD09坐标系)
- cv::mat
- 博客已经搬迁至 "seflerzhou.net"