随笔分类 - Jquery
摘要:String 对象 1、indexOf() 【返回某个指定的字符串值在字符串中首次出现的位置。 如果要检索的字符串值没有出现,则该方法返回 -1。】 eg: var str = "我爱中国";console.info(str.indexOf("我")!=-1); // trueconsole.inf
阅读全文
摘要:多个邮箱正则验证:/^(\w+([-+.]\w+)*@\w+([-.]\w+)+(;|;|,|,|\s)?)+$/i 多个电话正则验证:/^(1\d{10}(;|;|,|,|\s)?)+$/i
阅读全文
摘要://单选 $(':checkbox[name=ckb-jobids]').each(function () { $(this).click(function () { //单选 if ($(this).is(':checked')) { $(":checkbox").each(function ()
阅读全文
摘要:1、获取checkbox选中个数 $("input[name='ckb-jobid']:checked").length $("input[type='checkbox']:checked").length; 2、获取选中的值 //批量处理 $('#batchUpdate').on("click",
阅读全文
摘要:1、获取checkbox选中个数 $("input[name='ckb-jobid']:checked").length $("input[type='checkbox']:checked").length; 2、获取选中的值 //批量处理 $('#batchUpdate').on("click",
阅读全文