美文网首页
js处理后台返回数据标签

js处理后台返回数据标签

作者: 每天进步一点点5454 | 来源:发表于2021-09-14 16:12 被阅读0次
    var description = '<p style="margin-top:19.5pt;margin-right:0cm;margin-bottom:19.5pt;margin-left: 0cm;text-indent:24.1pt;mso-char-indent-count:2.0;mso-pagination:widow-orphan"> <b><span lang="EN-US" style="font-family:宋体;mso-bidi-font-family:宋体;color:#252525">1.</span></b><b><span style="font-family:宋体;mso-bidi-font-family:宋体;color:#252525">国际保险经纪行业收入分析</p>';
    description = description.replace(/(\n)/g, "");
    description = description.replace(/(\t)/g, "");
    description = description.replace(/(\r)/g, "");
    description = description.replace(/<\/?[^>]*>/g, "");
    description = description.replace(/\s*/g, "");
    description = description.replace(/<\/?[^>]*>/g, ''); //去除HTML tag
    description = description.replace(/[ | ]*\n/g, '\n'); //去除行尾空白
    description = description.replace(/ /ig, '');//去掉 

    console.log(description)
</script>

相关文章

网友评论

      本文标题:js处理后台返回数据标签

      本文链接:https://www.haomeiwen.com/subject/dibcgltx.html