tblCostSplit.html内容:
<nobr title="">只想显示里面内容,去掉nobr标签</nobr>
<nobr title="">只想显示里面内容,去掉nobr标签</nobr>
<nobr title="">只想显示里面内容,去掉nobr标签</nobr>
 
(1)html方法,会导致原来Dom内容的绑定事件出现错误,不建议使用
tblCostSplit.html(tblCostSplit.html().replace(/<nobr.*?>/ig"").replace(/<\/nobr>/ig""));  
 
(2)replaceWith方法,能正常替代标签,建议使用
jQuery("nobr", tblCostSplit).each(function () {
    jQuery(this).replaceWith(jQuery(this).html());
});

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-01-21
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案