javascript - How do I extract texts only without html markup? -
i trying extract texts without html markup using innertext.
//table html table structure var cells = table.innertext.trim() the cells data following:
1st cell 2nd cell 3rd cell 4th cell last cell how make every cell data array?
i have tried
cells = cells.split(' '); but doesn't work.
any here? lot!
just extract text each cell:
var arr=[], rowcells, myrows=table.rows; (var i=0; i<myrows.length; i++) { rowcells=myrows[i].cells; (var j=0; j<rowcells.length; j++) { arr.push(rowcells[j].innertext.trim()); } }
Comments
Post a Comment