替换标签
var str = "<p><span style='color:#ccc;'>这是测试标签</span><span>这是测试html内容</span></p>";
nohtml = str.replace(/<span.*?>|<\/span>/ig, "");
替换标签和内容
var str = "<p><span style='color:#ccc;'>这是测试标签</span><span>这是测试html内容</span></p>";
nohtml = str.replace(/<span\s*[^>]*>(.*?)<\/span>/ig, "");