var str='<div class='div_ce' align='center>合 计</div>' str.resplace('/(<.*?>|\s+| )/igm','') 结果是:合计