- 通过
outerHTML
document.documentElement.outerHTML
- 通过异步请求
$.get(window.location.href,function(res){ console.log(res); });
- 通过jQuery
$("html").html();
outerHTML
document.documentElement.outerHTML
$.get(window.location.href,function(res){ console.log(res); });
$("html").html();