方法一:
// 例如:
let str = "随着<font color='red'> 中国 </font>经济持续发展"
str.replace(/<\/?.+?>/g, '') //去除html标签
.replace(/ /g, '') // 去除
.replace(/\s+/g, '') // 去掉空格
方法二:
// 例如:
let str = "随着<font color='red'>中国</font>经济持续发展"
str.replace(/<[^>]+>/g, '')