String.prototype.stripHtml=function(){
    var re=/<(?:.)*?>/g;    // *? 意味着匹配任意数量的重复
    return this.replace(re,'');
};
var str='<p   >;
console.log(str.stripHtml());

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案