解决方案 »

  1.   

    用jquery remove移除掉
    var a=$('<div>'+str+'</div>');a.find('.shAn').remove();alert(a.html());
      

  2.   

    如果不用jquery ,直接用JS的正则表达式,如何写呢?
      

  3.   

    你好,我用你说的
    用jquery remove移除掉
    var a=$('<div>'+str+'</div>');a.find('.shAn').remove();alert(a.html()); 
    结果测试如下(firefox浏览器):
    TypeError: document.selection is undefined 00te.asp:1
    TypeError: a is undefined
    测试地址:http://ks.ekaoda.com/201501KS/ExamSystem/00te.asp
    我是用jquery-1.10.2.min.js
    请帮忙看一下,是哪里的问题?谢谢
    问题地址:http://bbs.csdn.net/topics/390955785?page=1#post-398687549
      

  4.   

    <script>$('.shAn').remove()</script>
    放页面底部