Javascript
javascript row 추가
wilson
2009. 7. 6. 18:08
반응형
/* 빈칸추가 */ function jsBlankAdd(){ var bcpHead = document.getElementById("bcpHead"); // 추가될곳 var bcpHeadRows = bcpHead.rows; var bcpHeadRowsLen = bcpHeadRows.length; var bcpHeadRow = bcpHeadRows[bcpHeadRowsLen - 1]; var bcpHeadCell = bcpHeadRow.cells; var bcpHeadCellLen = bcpHeadCell.length; var bcpHeadInsertRow = bcpHead.insertRow(); var regExp = /value=(.*?)/gi; for (var ii = 0; ii < bcpHeadCellLen; ii++) { bcpHeadInsertRowCell = bcpHeadInsertRow.insertCell(); bcpHeadCellHtml = bcpHeadCell(ii).innerHTML;//window.alert(bcpHeadCellHtml); bcpHeadCellHtml = bcpHeadCellHtml.replace(regExp, "");//window.alert(bcpHeadCellHtml); bcpHeadInsertRowCell.innerHTML = bcpHeadCellHtml; } }1 2 3 4
반응형