<div class="cbox rounded-corners">
<div>....<div>
<div id="sendclientid">Send to Client:<span><input type="checkbox" name="sendtoclient[]" class='sendtoclient' value="1" ></span></div>
<div>...</div>
</div>
<div class="cbox rounded-corners">
<div>....<div>
<div id="sendclientid">Send to Client:<span><input type="checkbox" name="sendtoclient[]" class='sendtoclient' value="2" ></span></div>
<div>...</div>
</div>
<div class="cbox rounded-corners">
<div>....<div>
<div id="sendclientid">Send to Client:<span><input type="checkbox" name="sendtoclient[]" class='sendtoclient' value="3" ></span></div>
<div>...</div>
</div>
<div class="cbox rounded-corners">
<div>....<div>
<div id="sendclientid">Send to Client:<span><input type="checkbox" name="sendtoclient[]" class='sendtoclient' value="4" ></span></div>
<div>...</div>
</div>
$('#sendclientid input').click(sendclientTextArea);
sendclientTextArea();
function sendclientTextArea() {
var allclientVals = [];
$('.start_booking_process_btmhref').removeClass("boldfont").attr("disabled", "disabled");
$('#sendclientval').val("");
$('#sendclientid :checked').each(function() {
var clientchecked_status = this.checked;
if (clientchecked_status == true) {
if($(this).val()=='')
{
$('.start_booking_process_btmhref').removeClass("boldfont").attr("disabled", "disabled");
$('#sendclientval').val("");
}
else
{
$('.start_booking_process_btmhref').removeAttr("disabled").addClass("boldfont");
}
}
allclientVals.push($(this).val());
$('#sendclientval').val(allclientVals);
});}
你可以在jsfiddle http://jsfiddle.net/PjP77/上查看这个,请在ie上检查这个,你可以看到在ff上,当你点击文本bx得到更新,但在ie中只有第一个文本框omehw激活了jq,而没有激活其他.....
有谁能解释一下..。谢谢
发布于 2011-09-20 13:50:17
现在,我可能错了,但我相信只有类是可重复的。webkit“id”属性应该是唯一的,我认为IE强制执行了;webkit和gecko工作的原因是为了兼容,它们有宽大的限制。
删除对id标记的所有引用可以修复IE7中的jsfiddle问题(它在IE9中工作得很好)。
尝试调整您的脚本,使其不是重复"id“属性,而是重复一个类。
祝好运!
https://stackoverflow.com/questions/7480599
复制相似问题