IE11Error - JavaScript函数中的预期标识符,字符串或数字

时间:2017-02-09 11:11:41

标签: javascript jquery cross-browser internet-explorer-11

我写的JS函数看起来像这样:

function createConversionMappingItemRow(mapType, listObj, className, convValue, convText, currValue, currText) {
        $('#' + listObj).find('tbody')
            .append($('<tr>').attr({ class: className }) // <---- THIS IS LINE 3409, 'c' in 'class:' is the 42nd char
                .append($('<td>').attr({ width: '5%', align: 'center' })
                    .append($('<input>').attr({ type: 'checkbox', onclick: (className == 'header' ? 'checkAllCurrentMapping("' + mapType + '", true)' : 'enableSaveButtons()') })
                    )
                )
                .append($('<td>').attr({ width: '45%', align: 'center' })
                    .append($('<span>').attr({ value: convValue })
                        .text(convText)
                    )
                )
                .append($('<td>').attr({ width: '5%', align: 'center' })
                    .append($('<span>').attr({ class: 'convarrow' })
                        .text('\u21c6')
                    )
                )
                .append($('<td>').attr({ width: '45%', align: 'center' })
                    .append($('<span>').attr({ value: currValue })
                        .text(currText)
                    )
                )
            );
    }

错误Expected identifier, string or number位于:行:3409,列:42

浏览器:Internet Explorer 11

JQuery Veersion:1.6.1

0 个答案:

没有答案