JavaScript: Checkbox onChange event is differently processed by IE and FF

 

DropDownList  onchange=""

TextBox onchange=""

CheckBox onclick=""

RadioButton onclick=""

 

JavaScript: Checkbox onChange event is differently processed by IE and FF

Try to click  the following buttons on IE and Firefox.

Using onchange

Using onclick

You have found the difference, right?

Internet Explorer only fires the onchange event when the checkbox loses the focus (onblur) while Firefox fires it immediately.

So you should be very careful to use onchange event if you want to develop cross-browser application. However, it is often overlooked.

 

http://radicgg.spaces.live.com/Blog/cns!B6E0F8E5B316313B!371.entry?wa=wsignin1.0&sa=689750514

posted @   emanlee  阅读(558)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
历史上的今天:
2008-10-17 How to grant permissions to a custom assembly that is referenced in a report in Reporting Services
点击右上角即可分享
微信分享提示