0

I have an html table which contains 25,000 rows and 8 columns I want to remove 1st, 2nd, 7th and 8th columns from the table, I can use some Design tools such as MS Visual web developer and Dreamweaver but it take too much time to render the table and some time it does not respond, I am looking for some text editor where I can get the same functionality to increase the performance.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Muhammad
  • 6,725
  • 5
  • 47
  • 54

1 Answers1

0

You can write simple code on javascript.

var table = document.getElementById("mytab");
for (var i = 0, row; row = table.rows[i]; i++) {
   //iterate through rows
   //rows would be accessed using the "row" variable assigned in the for loop
   for (var j = 0, col; col = row.cells[j]; j++) {
     if(j == 0 || j == 1 || j == 6 || j == 7) {
        row.removeChild(col)
     }
   }  
}

here is Fiddle link

Danis
  • 1,978
  • 3
  • 16
  • 27