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

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - X龙

远程唤醒wol(Wake On Lan) 我的附件列表 github项目管理 web模拟慢网速环境 按钮提交事件处理(以下方法兼容ie,firefox,chrome) js 格式化日期 div+css搭建系统页面框架 Win7下如何在任务栏显示操作中心的图标 清除右键图形属性 图形选项 .net软件工程师面试知识点 设置JqueryUI DatePicker默认语言为中文 asp.net mvc2升级到asp.net mvc3 pivot与unpivot用法 解决32位ie不能上网,64位ie能上网 seo robots.txt编写 xml xmlnamespace sql server 2005生成insert语句,同时完成多表(Bug:插入语句列列表最后一列列名后还带有,) input type=file显示及清空值 预防SQL注入攻击
js提交验证
X龙 · 2012-08-01 · via 博客园 - X龙

function setCheckSubmit()
{
    $(".bt_submit[type='submit']").bind("click", checkSubmit);
    $(".bt_submit[type='button']").attr("onclick", "if (!checkSubmit(event)){return false;}" + $(".bt_submit[type='button']").attr("onclick")); 
}

// 检测提交,兼容ie/firefox/chrome
function checkSubmit(event)
{
    // 防止重复提交
    if ($(this).attr("submitState") == "1")
    {
        return false;
    }

    var oEvent = event;

    // 如果是jquery.event
    if (event.originalEvent)
    {
        oEvent = event.originalEvent; 
    }

    // 检查必填项
    checkInput(oEvent);

    if (!oEvent.returnValue)
    {
        return false;
    }

    // 设置提交状态
    $(this).attr("submitState", "1").val("正在提交");
    return true;
}