正则去掉 html标签

var htmlStr='<p class="cjk" style="margin-bottom: 0cm; line-height: 16px;">关于融托优选<font face="Calibri, sans-serif"><span>APP</span></font>正式发布的通知!</p><p class="cjk" style="margin-bottom: 0cm; line-height: 16px;"><br/></p><p class="cjk" style="margin-bottom: 0cm; line-height: 16px;">尊敬的用户:</p><p class="cjk" style="margin-bottom: 0cm; line-height: 16px;"><br/></p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;">融托优选<font face="Calibri, sans-serif"><span>APP</span></font>于<font face="Calibri, sans-serif"><span>2019</span></font>年<font face="Calibri, sans-serif"><span>1</span></font>月<font face="Calibri, sans-serif"><span>12</span></font>日正式上线发布,欢迎各位下载安装。</p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;"><br/></p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;">融托优选,是一款综合类的第三方入住电子商务平台,集购物、旅游、娱乐、金融理财于一身,平台致力于帮用户排除不好的产品,让用户更轻松的选择商品;平台会对入住的第三方产品进行审核,符合标准的才允许上线。</p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;"><br/></p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;">秉承着让用户选择商品变轻松的原则,在产品类型、商品质量、用户体验等各个环节严格把控,力求能够帮助用户更便捷的提高生活品质。</p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;"><br/></p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;"><br/></p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;"><span>详情请咨询</span><font face="Calibri, sans-serif"><span><span>400-809-1991</span></span></font><span>,网址:</span><font face="Calibri, sans-serif"><span><font color="#0000ff"><u><a href="http://www.xiantaobx.com./"><span>www.xiantaobx.com.</span></a></u></font></span></font></p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;"><br/></p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;"></p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;">融托优选运营团队</p><p class="cjk" style="margin-bottom: 0cm; text-indent: 0.74cm; line-height: 16px;"><font face="Calibri, sans-serif"><span>2019</span></font>年<font face="Calibri, sans-serif"><span>1</span></font>月<font face="Calibri, sans-serif"><span>12</span></font>日</p><div><br/></div>';
            var stringtemp =htmlStr.replace(/<[^>]+>/g, "");
            console.log(htmlStr);
            console.log(stringtemp);
replace(/<[^>]+>/g, "")
posted @ 2019-01-16 14:01  盖大楼  阅读(5346)  评论(0编辑  收藏  举报