我试图通过使用innerText
来提取texts
没有html
标记。如何在没有html标记的情况下提取文本?
//table is a html table structure
var cells = table.innerText.trim()
的cells
数据是这样的:
1st cell
2nd cell
3rd cell
4th cell
last cell
我怎么每一个细胞的数据制作成array
?
我已经试过
cells = cells.split(' ');
,但它不工作。
这里有什么帮助吗?非常感谢!
'cells.replace( '\ n', '').replace( '\ r', '')分裂(”“);'可能工作 – Dementic