jquery更改html标签 span 文字获取 a,span,div,class对象内容 畅想由我

 1 <span class="class_span">买家昵称</span>
 2 
 3  $('.class_span').each(function () {        
 4         if($(this).text()=='买家昵称'){
 5              $(this).html('收货人');
 6         }
 7  });
 8  
 9  
10  


span 标签中在浏览器显示为"收货人"而不是 "买家昵称",因为用了text()方法

原文地址:https://www.cnblogs.com/plan/p/3077286.html