我写的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