87,989
社区成员
发帖
与我相关
我的任务
分享
var html="<html style=\" xxx:xxx\" ><div style=\" xxx:xxx\" class=\"xxxxx\"> ssss ss ss ss </div></html>";
alert(html);
html = html.replace(/\s+([^<>]+)(?=<)/g, function (m) {
return m.replace(/\s+/g,'');
});
alert(html);