把html源码转为前端显示的文本什么方法最好啊!(过滤html码)
把html源码转为前端显示的文本什么方法最好啊!(过滤html码)
比如把
<div id="sub">
<span class="location"><a href="../../index.htm" >首页>></a> <a href="../../life_index/index6_1.htm" >文化生活</a>>> <a href="../index123_1.htm" >生活百科</a>>> </span>
</div>
转成
首页>>文化生活>>生活百科>>
什么方法最好啊?
正则太麻烦啊