js 正则替换html标签

function deleteTag(str)
{
  var regx = /<[^>]*>|<\/[^>]*>/gm;
  if(str) return str.replace(regx,"");
return ''; } deleteTag('<p>小五老师:</p><p>  其他应收款主要包括:</p><p> (1)应收的各种… 选项C,计入应收账款。</p><p> 综上,本题应选C。<br></p>')

 

posted on 2020-11-19 17:09  神奇的旋风  阅读(2240)  评论(0编辑  收藏  举报

导航