输入banner图图片脚本导航/分类

JavaScript获取当前网页源码的实例

  1. 通过 outerHTML

    document.documentElement.outerHTML
  2. 通过异步请求

    $.get(window.location.href,function(res){
       console.log(res);
    });
  3. 通过jQuery

    $("html").html();

以上就是JavaScript获取当前网页源码的实例的详细内容,更多请关注Gxl网其它相关文章!