2011/03/27 為TABLE 增加 Row / Cell ,並且加上各式的屬性
第一次使用範例為UpdateData_TermCust.js
newRow= tbody.insertRow(tbody.rows.length);
newRow.id = fieldKeyValue; //可以利用這個欄位來做刪除row,$('#'+fieldKeyValue).remove(); newRow.name = "addCls"; // 為了修改件數可以刪除添加的行,我用addCls作為name識別 newRow.className = "addClass"; //同樣是為了刪除下面添加的行,因為有2行就是刪不掉 cellidx=0; // an inserted row has no cells, so insert the cells
newCell = newRow.insertCell(cellidx); newRow.bgcolor="#E7EDF5"; newRow.colspan="5"; // give this cell its own id newCell.name = "addCls"; // display the row's id as the cell text newCell.align="center"; newCell.colspan="5"; newCell.bgcolor="#E7EDF5"; newCell.innerHTML = "<font name='addCls' color='#2D486C'>第"+i+"件的信息</font>";