jQuery live() 和 Internet Explorer
将选择输入动态添加到表单中
$(selector).append(html)
我通过使用 live('change',handler)
为所有选择绑定更改事件, 。问题是代码在所有浏览器中都正常,除了 Internet Explorer(所有版本)。
我已经用插件 livequery()
替换了 live(),该插件仍然在所有浏览器中工作,并且我在 Internet Explorer 中出现了奇怪的行为。
有人可以告诉我将事件绑定到页面加载完成后将创建的元素的正确方法吗?
如果您知道一些用于跟踪 Ajax 请求的良好调试工具(Internet Explorer)。
谢谢。微软让生活变得更加困难。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这听起来好像您仍在使用 1.4.2 之前版本的 jQuery,如果您升级到 jQuery1.4.2 版本 你的问题应该消失。
1.4.2 包含一个事件模块重写,解决了
change
中的冒泡问题IE。This sounds like you're still using a pre-1.4.2 release of jQuery, if you upgrade to the jQuery1.4.2 release your problems should go away.
1.4.2 included an events module re-write that resolved the
change
bubbling issue in IE.