正则匹配去掉所有html标签 var a = "<span>999</span>" a = a.replace(/<[^>]+>/g,' ') console.log(a) 转载于:https://www.cnblogs.com/cnundefined/p/7027276.html