jQuery获取包括当前元素的HTML

1、获取当前元素内的HTML

(1)方法一

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

(2)方法二

document.getElementById("current").innerHTML;

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

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

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

原文地址:https://www.cnblogs.com/ch-zaizai/p/9044600.html