Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/387.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jquery表单元格单击操作_Javascript_Jquery_Datatables - Fatal编程技术网

Javascript jquery表单元格单击操作

Javascript jquery表单元格单击操作,javascript,jquery,datatables,Javascript,Jquery,Datatables,我有如下jQuery代码: $(document).on("click", "#chkSelectAll", function (e) { window.alert("Test"); }); 单击“全选”复选框时,将显示警报,但在firebug中返回错误: 类型错误:e.push不是一个函数 奇怪的是,当我使用以下命令分别单击每个项目时: $(document).on("click", "#tblCTCProducts tbody tr label input", function

我有如下jQuery代码:

$(document).on("click", "#chkSelectAll", function (e) {
     window.alert("Test");
 });
单击“全选”复选框时,将显示警报,但在firebug中返回错误:

类型错误:e.push不是一个函数

奇怪的是,当我使用以下命令分别单击每个项目时:

$(document).on("click", "#tblCTCProducts tbody tr label input", function (e) {
    window.alert("Test");
});
firebug没有返回任何错误

编辑一: 我正在使用

编辑二 包括我正在使用的局部视图:

@model IEnumerable<EUVCCD.ViewModels.VM_EUVCCD_Product>

<div id="divProductsTableHolder" class="col-md-12 container CheckBoxesPartial" style="white-space: nowrap;">
    <table id="tblProducts" class="table centered table-small table-bordered" style="width: 100%">
        <thead>
            <tr>
                <th>
                    <input id="txtSearchProduct" placeholder="Search Product" class="col-md-12"/>
                </th>
            </tr>
            <tr>
                <th>
                    <label class="checkbox-inline col-md-12">
                        <input id="chkSelectAllProducts" type="checkbox" value="-1" name="All" />All</label>
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        <label id="lblProduct_@item.ID" class="checkbox-inline col-md-12">
                            <input type="checkbox" value="@item.ID" name="@item.ProductName" class="ProductsCheckbox"/>@item.ProductID - @item.ProductName</label>
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
@model IEnumerable
全部的
@foreach(模型中的var项目)
{
@item.ProductID-@item.ProductName
}

您认为问题可能出在“全选”复选框所在的表格的最前面吗?

@KonstantinDinev为什么?我应该用什么来代替?我仍然不喜欢FF开发工具,但它比FireBug好一点。Firebug是一个第三方工具,多年来一直无法正常运行。在第二个代码中,您应该会出现错误:
未捕获的语法错误:意外标记)(…)
@KonstantinDinev感谢您的快速响应。你会为Chrome推荐什么?Chrome开发工具工作正常;)@康斯坦丁诺夫为什么?我应该用什么来代替?我仍然不喜欢FF开发工具,但它比FireBug好一点。Firebug是一个第三方工具,多年来一直无法正常运行。在第二个代码中,您应该会出现错误:
未捕获的语法错误:意外标记)(…)
@KonstantinDinev感谢您的快速响应。你会为Chrome推荐什么?Chrome开发工具工作正常;)