标签:class blog 标签 log htm replace 正则 let html
$(‘#Text‘).find(‘br‘).remove();//移除br标签 let content = $(‘#smsText‘).html().replace(/ /g, ‘ ‘).replace(/&/g, ‘&‘)
.replace(/<\/?[^>]*>/g,‘‘)//过滤html的标签
.replace(/</g, ‘<‘).replace(/>/g, ‘>‘)
标签:class blog 标签 log htm replace 正则 let html
原文地址:http://www.cnblogs.com/sxz2008/p/6639116.html