常用JS

替换html

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

正则替换ALL

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

正则替换所有空位

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

 

posted @ 2023-05-15 09:49  yyutudou  阅读(7)  评论(0编辑  收藏  举报