大家好,
请检查下面它工作正常在IE浏览器,但没有在Mozila工作的代码。
这个场景是我的checkboxlist LIDT代码数据绑定背后。
如果用户选择列表的第一个项目,他是不是可以选择任何其他的和其他人将disbaled。
现在,如果用户选择的任何其他,房委会不能选择第一个,它会被自动禁用。
当用户取消选中的复选框可以在disbaled所有。
我已经做了它,它在IE浏览器的工作,请告诉我,我有什么做才能让Mozila和其他工作也
一种快速的答复是期待已久的!
代码为:
请检查代码是否有任何变化,它运行在Mozila ............ //To Enable and Disable check boxes of worker status
function UnCheckAll() {
if (document.getElementById("cblStatus").cells.innerText != "") {
//Get the checkboxlist object
var checkBoxList = document.getElementById("cblStatus");
//Get the number of checkboxes in the checkboxlist
var numCheckBoxItems = checkBoxList.cells.length;
if (document.getElementById(checkBoxList.id + '_' + [0]).checked == true) {
for (i = 1; i < numCheckBoxItems; i++) {
//Get the checkboxlist item
var checkBox = document.getElementById(checkBoxList.id + '_' + [i]);
//Check if the checkboxlist item exists, and if it is checked
checkBox.checked = false;
checkBox.disabled = true;
}
}
else {
for (i = 1; i < numCheckBoxItems; i++) {
//Get the checkboxlist item
var checkBox = document.getElementById(checkBoxList.id + '_' + [i]);
//Check if the checkboxlist item exists, and if it is checked
checkBox.disabled = false;
}
document.getElementById(checkBoxList.id + '_' + [0]).checked = false;
document.getElementById(checkBoxList.id + '_' + [0]).disabled = true;
}
//Enable sourced now
if (EnableSourced(numCheckBoxItems, checkBoxList)) {
document.getElementById(checkBoxList.id + '_' + [0]).disabled = false;
}
}
}
//To enable sourced checkbox
function EnableSourced(numCheckBoxItems, checkBoxList) {
var RETVAL = false;
for (i = 1; i < numCheckBoxItems; i++) {
//Get the checkboxlist item
var checkBox = document.getElementById(checkBoxList.id + '_' + [i]);
if (checkBox.checked == true) {
return false;
}
else {
RETVAL = true;
}
}
return RETVAL;
}
任何一个人可以帮助我,请.........先谢谢了............
任何一个,请帮我..................
确定任何一个不知道如何使它??????
我完全与此代码frustated的家伙,请帮助。它真正需要的。我不喜欢的JavaScript。因为它不是一个标准的语言,任何我怎么能写上面的代码,它的工作在IE浏览器,但在Mozila。请尝试解决这个问题。
请它解决!!!!!!!
???????????????
???????????
\
??
请帮助!!!!!!
? Firebug的,我不知道,请让解决?????
任何一个,请帮我,我怎么能找到ListBox中的总项目在mozila?然后检查它的Checked属性?
请HELPPPPPPPPPPP!!!!!!!11
{C}