var str = "<span style='display:none;'>清除了格式</span><img src=''></img><strong></strong><br/>"; str = str.replace(/<[^>].*?>/g,""); alert(str);