常用JS

替换html

str.replace(/<[^>]+>/g, '')

正则替换ALL

str.replace(/&nbsp;/g, '')

正则替换所有空位

str.split(/[\t\r\f\n\s]*/g).join('')

 

posted @ 2023-05-15 09:48  yyutudou  阅读(29)  评论(0)    收藏  举报