美文网首页
js获取网页源代码

js获取网页源代码

作者: 点沙微痕 | 来源:发表于2021-03-10 14:52 被阅读0次

              let sourceCodeTxt = '';

              var xhr = new XMLHttpRequest();

              xhr.open('GET', window.location.href, false);

              xhr.send();

              sourceCodeTxt= xhr.responseText;

    相关文章

      网友评论

          本文标题:js获取网页源代码

          本文链接:https://www.haomeiwen.com/subject/zxutbctx.html