1、获取当前元素内的HTML

(1)方法一

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

(2)方法二

document.getElementById("current").innerHTML;

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

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

 

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

posted on 2018-05-16 10:22  仔仔爱学习  阅读(829)  评论(0)    收藏  举报