js过滤字符串中的html标签

var str = 'add<a>daad</a><p>fsdada</p>'
str.replace(/<[^<>]+>/g,'')

 

posted @ 2019-07-05 09:51  WXUECHAO  阅读(3821)  评论(0编辑  收藏  举报