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

推荐订阅源

Cloudbric
Cloudbric
量子位
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
MyScale Blog
MyScale Blog
宝玉的分享
宝玉的分享
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
I
InfoQ
Jina AI
Jina AI
雷峰网
雷峰网
大猫的无限游戏
大猫的无限游戏
F
Full Disclosure
Vercel News
Vercel News
T
Tailwind CSS Blog
P
Proofpoint News Feed
G
Google Developers Blog
P
Privacy & Cybersecurity Law Blog
D
Docker
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tenable Blog
K
Kaspersky official blog
Cisco Talos Blog
Cisco Talos Blog
D
DataBreaches.Net
The Hacker News
The Hacker News
J
Java Code Geeks
Hacker News: Ask HN
Hacker News: Ask HN
G
GRAHAM CLULEY
PCI Perspectives
PCI Perspectives
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
Forbes - Security
Forbes - Security
Microsoft Security Blog
Microsoft Security Blog
C
Check Point Blog
F
Fortinet All Blogs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Latest news
Latest news
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Webroot Blog
Webroot Blog
L
LINUX DO - 最新话题
S
Secure Thoughts
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
AI
AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed

博客园 - 哪热

虚拟机安装 VMware7.0 + ubuntu10.10 转载:Oracle学习:数据库规划 CHM 不能打开的问题 VS2005水晶报表在时部署时遇到的问题 如何设置开机自启动 解决先装VS再装IIS的出错 笔记本电脑如何来拷屏? oracle 不能更新 PL/SQL 点击“edit data”报“ these query results are not updateable” 封装一个访问Oracle数据库的类 从本地拖资源到远程桌面上如何设置 在Visual Studio 2005中进行Javascript的调试 如何获取服务器的IP 如何在aspx文件中调用关联的cs文件中的属性 Visual Studio .NET 无法创建应用程序 。问题很可能是因为本地 Web 服务器上没有安装所需的组件 ----转载 转载:VS2008转VS2005 斐波那契(Fibonacci)数列 素数 URL的传递字符串问题小研究(续) GridView数据更新问题
.Net 点击实现验证码的刷新(转载)
哪热 · 2009-07-31 · via 博客园 - 哪热

验证码是由4个随机数和一些使用GDI+技术绘制的噪点而组成的。
验证码生成文件:CheckCode.aspx.cs

Code


如果要在验证码中同时有字母和数字,可以将生成验证码的方法改为:

Code


在页面中调用:

<img src="CheckCode.aspx" alt="看不清,请点击我!" id="imgCheckCode" onclick="this.src='CheckCode.aspx?abc='+Math.random()"/>

注意:有一点要说明,当点击刷新时,validate.asp?后面一定要有一个参数,若没有这个无效的参数,程序会认为你请求的是同一个文件,因而不会刷新的。这里的参数abc是个随意的,只起改变请求文件的作用。