jQuery替换html标签

  • 2021年10月29日
  • Mysql

jQuery能够非常轻松地实现html标签替换

$('li').replaceWith(function(){ 
  return $("<div />").append($(this).contents()); 
});

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注