清除文本中的HTML标签

`

  var text = '<div style="color:red">我是标签</div>'
      text = text.replace(/<[^>]+>/g,"");
      console.log("text = "+text);//text = 我是标签

`

posted @ 2021-01-20 17:08  小白白嘿  阅读(225)  评论(0编辑  收藏  举报
//显示代码复制按钮 //鼠标点击特效第二种(小烟花)