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

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - 自信飞扬

mac 10.8 编译提示找不到GCC .NET Framework 4.5 五个很棒的特性 easyui datagrid json 格式 IE打印 javascript 解析json javascript 函数toFixed javascript操作select和AjaxPro返回数组点滴 详读《.NET 设计规范》 关于打包winfrom 程序的注意事项 WCF协议 apache编译参数 asp.net中应用jquery + ashx的传值 - 自信飞扬 获取鼠标坐标 获取应用程序所在的物理路径 静止输入法切换的CSS 防止DIV被撑开的CSS asp.net ajax MSDN帮助 asp.net 角色管理 MSDN帮助路径 CSS设置DIV中写入字符自动换行 - 自信飞扬 - 博客园
javascript刷新验证码
自信飞扬 · 2011-07-29 · via 博客园 - 自信飞扬

javascript代码:

1 function refreshImgYZM(){
2         document.getElementById("yzmimg").src = "codeimg/code.asp??timestamp=" + Date();
3         return false;
4     }

代码中指定产生验证码的文件路径后面加上一个随机参数,才能动态更新图片

HTML代码:

1 <div><img src="codeimg/code.asp" id="yzmimg"><href="javascript:void(0)" style="color:blue;border-bottom:1px ;" onClick="return refreshImgYZM()">看不清楚换一张</a></div>
2                              <input name="yzm" type="text" class="wenbenkuang" id="yzm" onFocus="return refreshImgYZM()">

代码中的javascript:void(0)是为避免不必要的页面滚动