解决方案 »

  1.   

    去掉所有html标签?    var s = '<img src="http://localhost:8080/xcty/pages/wwz/plugins/emoticons/33.gif" alt="" border="0" height="24" width="24" />啊时代发生地方撒地方<img src="http://localhost:8080/xcty/pages/wwz/plugins/emoticons/53.gif" alt="" border="0" height="24" width="24" />啊时代发生地方撒地方<img src="http://localhost:8080/xcty/pages/wwz/plugins/emoticons/53.gif" alt="" border="0" height="24" width="24" /><br />';
        s = s.replace(/<[^>]+>/g, '');
        alert(s);
      

  2.   

        var s = '<img src="http://localhost:8080/xcty/pages/wwz/plugins/emoticons/33.gif" alt="" border="0" height="24" width="24" />啊时代发生地方撒地方<img src="http://localhost:8080/xcty/pages/wwz/plugins/emoticons/53.gif" alt="" border="0" height="24" width="24" />啊时代发生地方撒地方<img src="http://localhost:8080/xcty/pages/wwz/plugins/emoticons/53.gif" alt="" border="0" height="24" width="24" /><br />';
        s = s.replace(/[^\u4e00-\u9fa5]+/g, '');
        alert(s);