日期:2014-05-16 浏览次数:20349 次
<div class="outer" style="border:#ff0000 2px dotted; height:100px; width:100px; background-color:#999999;">
<div class=<span class="red">"outer"</span> style=<span class="red">"border:#ff0000 2px dotted; height:100px; width:100px; background-color:#999999;"</span>>
var str='<div class="outer" style="border:#ff0000 2px dotted; height:100px; width:100px; background-color:#999999;"> '; alert(str.replace(/(\"[^"]*\")/g,"<span class=\"red\">$1</span>"));
------解决方案--------------------
楼上 可行