惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
Docker
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
T
Tenable Blog
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Project Zero
Project Zero
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Scott Helme
Scott Helme
A
About on SuperTechFans
WordPress大学
WordPress大学
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
G
GRAHAM CLULEY
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Schneier on Security

博客园 - ★金★

导出EXCEL table变宽格式 IE11兼容性设定 C#获取多个相同name值 DIV左右行 Jquery绑定Select下拉菜单 SQL中多项合并时请加ISNULL Repeater中绑定下拉菜单的2种方法 WebForm设置URL路由后要照顾好之前的连接 Repeater中获取HTML select 值 NPOI生成Excel 博文阅读密码验证 - 博客园 Firefox中不支持parentElement用parentNode取代 jquery给span赋值的时候出现firefox不兼容 javascript可用数组取代case格式化字符 display和visibility的区别 SQL中Replace替换引号 javascript动态添加删除行后行内计算及取值 取代RadioButtonList及RadioButton方法
jquery表单验证增加确认及可选不需要验证的方法
★金★ · 2011-04-08 · via 博客园 - ★金★

增加如下代码,可在验证后再次确认,有时候很有用,如下:

 submitHandler: function (form) {
                
if (confirm("提醒:您确定要执行此次操作吗?")) { disableOtherSubmit(); $("#btnSubmit").val("处理中..."); form.submit(); }

选择勾选项需不需要验证:

chkjedj: { required: "#chkjedj:checked" }

及以下代码:

        $("#chkjedj").click(function () {
            
var ischk = $("#chkjedj").is(":checked");
            
if (ischk) {
                document.getElementById(
"shownmmail").style.display = "inline";
                $(
'#txtzxnames').attr('disabled''');
                $(
'#txtzxemail').attr('disabled''');
            }
            
if (!ischk) {
                document.getElementById(
"shownmmail").style.display = "none";
                $(
'#txtzxnames').attr('disabled''disabled');
                $(
'#txtzxemail').attr('disabled''disabled');
            }
        });