关于JavaScript中使用正则表达式去除Html样式属性的说明

var test = "<div style=\"height:100px;\">测试<div>";
test = test.replace(/style\=\"[^\"]*\"/g, "");
return test;

发表回复