<div class="aa">
<span class="aa_a">
<font face="webdings" >1</font>
</span><a href="index2.html">
<font face="webdings" >1</font>
</a>
</div>我是想用jquery把class="aa"下面的
<font face="webdings" >1</font>
都替换成:
<font>2</font>请教大侠们~~

解决方案 »

  1.   

    $(".aa").html('<font face="webdings" >1</font>')
      

  2.   

    本帖最后由 net_lover 于 2013-09-08 12:07:47 编辑
      

  3.   

    $(".aa").html("<font>2</font>")
      

  4.   


    其它的标签不能改动,就只能改动这个<font face="webdings" >1</font>
      

  5.   

    <script>
    $(function(){
    $(".aa font").replaceWith('<font>2</font>') 
    })
    </script>
      

  6.   

    还有一种<script>
        $(document).ready(function() {
            $(".aa font[face='webdings']").each(function(index) {
        $(this).text("2").removeAttr('face');
    }); 
    </script>