-1

我使用以下 javascript 我在
var cbPOC = row.cells(row.cells.length - 2).getElementsByTagName('input')[0]; .error is TypeError: Property 'cells' of object # is not a function

function sss(tableName)
{
var table = getServerObject(tableName);
var cell,row; 
for (var i = 2; i < table.rows.length - 1; i++)
{
    row = table.rows[i];

    var cbPOC = row.cells(row.cells.length - 2).getElementsByTagName('input')[0];
    if (cbPOC.checked) continue;
    {
     //Something
    }

}
4

1 回答 1

2

row.cells(row.cells.length - 2)应该row.cells[row.cells.length - 2]

尝试。

于 2012-06-19T06:35:13.683 回答