复选框选中的属性在Firefox中显示不同的值,在javascript中显示chrome

时间:2014-11-27 13:52:01

标签: javascript html google-chrome firefox checkbox

我的复选框位于

下方
<input type="checkbox" id="checkAll" name="checkAll" onclick="chkAll()"  />

Javascript代码

    function chkAll() {
            var chkBox = document.getElementById('checkAll');

            alert(chkBox.checked);
}

警告在firefox中显示为true,在chrome中显示为false。

请任何人都可以提供解决方案

提前致谢

0 个答案:

没有答案