1、获取当前元素内的HTML

(1)方法一

$("#current").html();

(2)方法二

document.getElementById("current").innerHTML;

2、获取包括当前元素在内的HTML

$("#current").prop("outerHTML");

 

参考资料:https://blog.csdn.net/yixu0534/article/details/78653409 

相关文章:

  • 2022-12-23
  • 2021-12-03
  • 2022-01-01
  • 2022-12-23
  • 2022-01-17
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2021-05-16
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
相关资源
相似解决方案