1
這裏是我的javascript代碼:
$("#gridProcessDetail tbody").on('click', 'tr', function() {
$(this).context.cells.each(function (ind) {
var txt = $(this).html();
});
}
$(this).context.cells
返回兩個細胞,但它說:
html is not is not a function at HTMLTableRowElement.<anonymous> (Invoice:472)
at HTMLTableSectionElement.dispatch (jquery-1.11.3.min.js:4)
at HTMLTableSectionElement.r.handle (jquery-1.11.3.min.js:4)
你爲什麼不使用'$( 'TD',這一點)。每個()'?沒有明智的理由,您正在將jQuery API與DOM API混合使用。 – undefined