JavaScript获取当前网页的源码
JavaScript获取当前网页的源码
- 通过
outerHTMLdocument.documentElement.outerHTML - 通过异步请求
$.get(window.location.href,function(res){ console.log(res); }); - 通过jQuery
$("html").html();
转载于:https://www.cnblogs.com/jehorn/p/7753116.html
参考 https://blog.csdn.net/weixin_30611509/article/details/97291586?o
