前端js 过滤富文本编辑器中带过来的标签和&nbsp之类的

test.replace(/<[^>]+>|&[^>]+;/g, "")

猜你喜欢

转载自blog.csdn.net/qq_33737087/article/details/86236047