我正在使用从文本中剥离HTML。return doc.body.textContent || "";如果我有这样的HTML:This is the second line<br>它去掉断行,并创建如下文本:
This is the first lineThis is the second lineThis is the third<em
我试图从一个表中生成一个图表,该表在TD中有各种HTML标签,链接等,我试图剥离HTML在图表中使用,但保留现有的表与链接等。这是我的代码: function stripHTML(html) var tmp = document.createElement("DIV"); return tmp.text