Cita:
Iniciado por rene_bustos
par poder ayudarte es necesario que pongas el codigo con el cual trabajas, de otra forma no podremos hacernada, ya que solo mandeste el HTML con algo de JAVASCRIPT
saludos.
Ohh.. Si.. Sorry!!! Ya lo edité!! Código PHP:
<script type="text/javascript" language="JavaScript">
function addNewRow(){
var TABLE = document.getElementById("base");
var TROW = document.getElementById("example");
var content = TROW.getElementsByTagName("td");
var newRow = TABLE.insertRow(-1);
newRow.className = TROW.attributes['class'].value;
insertLOselect(content,newRow);
var newRow2 = TABLE.insertRow(-1);
newRow2.className = TROW.attributes['class'].value;
//window.alert(content);
copyRow(content,newRow2);
}
function removeLastRow() {
var TABLE = document.getElementById("base");
if(TABLE.rows.length > 2) {
TABLE.deleteRow(TABLE.rows.length-1);
TABLE.deleteRow(TABLE.rows.length-1);
}
}
function appendCell(Trow, txt) {
var newCell = Trow.insertCell(Trow.cells.length)
newCell.innerHTML = txt
}
function copyRow(content,Trow) {
var cnt = 0;
for (; cnt < content.length; cnt++) {
appendCell(Trow, content[cnt].innerHTML);
}
}
function insertLOselect(content,Trow) {
var cnt = 0;
for (; cnt < content.length-1; cnt++) {
appendCell(Trow, ' ');
}
}
</script>