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

推荐订阅源

博客园 - Franky
W
WeLiveSecurity
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News and Events Feed by Topic
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Security Affairs
SecWiki News
SecWiki News
T
Tenable Blog
C
CERT Recently Published Vulnerability Notes
Forbes - Security
Forbes - Security
Google Online Security Blog
Google Online Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
T
Threat Research - Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
PCI Perspectives
PCI Perspectives
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
Cyberwarzone
Cyberwarzone
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
V
Vulnerabilities – Threatpost
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
V
Visual Studio Blog
T
Threatpost
Project Zero
Project Zero
Know Your Adversary
Know Your Adversary
I
InfoQ
G
Google Developers Blog
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
T
The Blog of Author Tim Ferriss
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
TaoSecurity Blog
TaoSecurity Blog
O
OpenAI News
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tor Project blog
Schneier on Security
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Security Latest
Security Latest
Attack and Defense Labs
Attack and Defense Labs
aimingoo的专栏
aimingoo的专栏
H
Heimdal Security Blog

博客园 - K!ngZ

常用正则 MongoDB学习笔记(9)--优化器 profile MongoDB学习笔记(8)--索引及优化索引 MongoDB学习笔记(7)--访问控制 MongoDB学习笔记(6)--数据备份数据恢复 MongoDB学习笔记(5)--数据导入导出mongoexport MongoDB学习笔记(4)--Capped Collection MongoDB学习笔记(3)--高级查询 MongoDB学习笔记(2)--增删改查 MongoDB学习笔记(1)--了解MongoDB 远程文件抓取类 [转]BizTalk开发系列(三十四) Xpath SQL Server 2005 命令行实用工具 [转]雅虎公司C#笔试题 [转] OLE DB 访问接口 "SQLNCLI" 返回了消息 "未指定的错误"。 Asp.net中的日期处理函数 [转]正则表达式实现资料验证的技术总结 ajax乱码问题解决 [转]ASP.Net缓存总结
[转]预防按钮的多次点击【恶意刷新】
K!ngZ · 2008-08-20 · via 博客园 - K!ngZ

<asp:button runat="server" ID="btn" text="Button" OnClick="aa_Click" />

public void page_load(Object obj,EventArgs e)
{
  btn.Attributes.Add("onclick","state=true;");
  StringBuilder sb=new StringBuilder();
  sb.Append("if (!state) return;");
  sb.Append("var button=document.getElementById('btn');");
  sb.Append("button.value='Please Wait...';");
  sb.Append("document.body.style.cursor='wait';");
  sb.Append("button.disabled=true;");
  string strScript="<script>";
  strScript=strScript +"var state=false;";
  //将函数绑定到页面的onbeforeunload事件:
  strScript=strScript +"window.attachEvent('onbeforeunload',function(){" +sb.ToString()+ "});";
  strScript=strScript +"</"+"script>";
  Page.RegisterStartupScript("onbeforeunload",strScript);
}
    protected void aa_Click(object sender, EventArgs e)
    {
        //模拟长时间的按钮处理
        System.Threading.Thread.Sleep(2000);
        Response.Write("<script>alert('bbbbbb!!');" + "</" + "script>");
    }