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

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

博客园 - RevengeBoy

请求帮助 SQL 2005 master..xp_cmdshell 死锁问题 Rc4 encrypt in PeopleSoft - RevengeBoy CSS隐藏滚动条 - RevengeBoy - 博客园 程序员 2008的最后一天 大家有什么感想说出来吧 魔兽争霸III 1.20, 1.21 1.22 需要特定语言版本之Window 解决办法 css 换行 且不分割最后一个单词 - RevengeBoy 英文系统 中 中文成了乱码问题 sql 查询第5行到第7行 之间的行 反射技术与工厂方法 (using C#) 图片水印效果 - RevengeBoy - 博客园 Membership、MembershipUser和Roles类 上传大文件控件 显示进度条! (OnClientClick 和 OnClick 新页面回传值)(gridview中获取控件 获取值) [转]ASP.NET(C#)常用代码33例 电脑常识---[二] 最近创作---用户控件 蓦然回首 profile 的使用(更换皮肤转换语言) dropdownlist 下的 SelectedValue 问题
vista ie7 window.confirm() 取消按钮 失效 解决办法 - RevengeBoy
RevengeBoy · 2008-12-15 · via 博客园 - RevengeBoy

vista ie7 window.confirm()  取消按钮 失效解决办法

曾经写过这么一句,我认为这个代码绝对是没有问题的 button 的 OnClick="btnReset_Click" OnClientClick="return window.confirm('All the changes will be lost');“

结果客户那边几台vista机器 测试这个功能的时候 不管在弹出窗口 点确定还是取消。 onlcik 事件都照样执行。 折腾了好久,结果 用了一段完整的代码

 <asp:Button ID="btnReset" TabIndex="502" runat="server" Font-Bold="True" Text="Reset"
                                                OnClick="btnReset_Click" OnClientClick="if(!window.confirm('All the changes will be lost')){event.returnValue = false;}">
                                            </asp:Button>

这样就可以了。

如果有遇到这种情况的朋友 你可以用上面的代码试试,

还有的情况是安全级别太高, 导致 alert confirm 完全失效。

还有一种情况是 你安装的一些软件有冲突导致confirm 失效。