在ie8中的复选框上添加了奇怪的jquery属性 [英] strange jquery attribute added on checkbox in ie8

查看:91
本文介绍了在ie8中的复选框上添加了奇怪的jquery属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常奇怪的错误,即ie8会将下面的属性注入到输入复选框html中:

I have a very strange bug whereby ie8 would inject the attribute below in the input checkbox html:

jQuery17202259447732522888 ="19"

jQuery17202259447732522888="19"

<INPUT id=picture-author class=valid value=true type=checkbox name=IsPhotoRiskAccepted data-val-required="The IsPhotoRiskAccepted field is required." data-val="true" _just_changed="true" jQuery172007312802653214206="18"><INPUT value=false type=hidden name=IsPhotoRiskAccepted jQuery172007312802653214206="19">

由于此属性,我们无法选择ie8中的复选框.当从复选框中删除此属性时(通过ie8控制台),不会发生该错误.

We are unable to select the checkbox in ie8 due to this attribute. When removing this attribute from the checkbox (through ie8 console) the bug does not occur.

任何帮助将不胜感激

谢谢

推荐答案

jQuery使用此"expando"属性来跟踪绑定到您的复选框元素的事件.如果您无法检查它,那可能是因为您有一个阻止它的事件处理函数.

This "expando" attribute is used by jQuery to keep track of the events bound to your checkbox element. If you can't check it, that's probably because you have an event handler function preventing it.

此处更多:自动添加到元素的jQuery属性

这篇关于在ie8中的复选框上添加了奇怪的jquery属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆