日期:2014-05-16 浏览次数:20439 次
var str = '<pre style="word-wrap: break-word; white-space: pre-wrap;">str</pre>'; var reg = /\<[^\>]*\>([^\<]*)\<[^\>]*\>/g; var a = str.replace(reg,function($0,$1){return $1;}); console.log(a);