function clearDomScriptTag(s) { var reg=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; //生成相关正则信息 s = s.replace(reg, "");//忽略大小写的正则 return s; }