【问题标题】:Error: Error: Syntax error, unrecognized expression:错误:错误:语法错误,无法识别的表达式:
【发布时间】:2012-08-13 13:45:50
【问题描述】:

我不断收到以下错误

错误:错误:语法错误,无法识别的表达式:表 $MainContent$gridPlans$ctl02$chkSelected 源文件:http://code.jquery.com/jquery-latest.min.js 行:2

我已经研究了导致此问题的脚本的哪一部分,但不确定如何解决它:

// Check Box selector
    $("input:checkbox:not(:checked)").each(function () {
        var column = "table ." + $(this).attr("name"); // this line is not working
        $(column).hide();
    });

    $("input:checkbox").click(function () {
        var column = "table ." + $(this).attr("name");
        $(column).toggle();
    });

// Manage column checkboxes that should be unchecked
function manChecks() {
    var __CS = document.getElementById('__CS');
    var cols = __CS.value; // this line also causing issues

    colManage(1, cols.indexOf('|1') != -1);
    colManage(2, cols.indexOf('|2') != -1);
    colManage(3, cols.indexOf('|3') != -1);
    colManage(5, cols.indexOf('|5') != -1);
    colManage(6, cols.indexOf('|6') != -1);
    colManage(7, cols.indexOf('|7') != -1);
    colManage(8, cols.indexOf('|8') != -1);
    colManage(9, cols.indexOf('|9') != -1);
}

function colManage(id, show) {
    document.getElementById(id).checked = show;
    var column = "table ." + id;
    if (show) {
        $(column).show();
        $('label[for=' + id + ']').addClass('checked')
    }
    else {
        $(column).hide();
        $('label[for=' + id + ']').removeClass('checked')
    }
}

【问题讨论】:

    标签: javascript jquery


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 2016-03-21
    • 1970-01-01
    • 1970-01-01
    • 2012-08-28
    • 1970-01-01
    • 2012-02-17
    • 2015-10-06
    • 2015-01-13
    相关资源
    最近更新 更多