studioAura
12/3/2019 - 1:03 PM

Получить файл через JS

<script>
  var req = new XMLHttpRequest();
    req.open('GET', 'http://testing.loc/files/loco/ct-0106/index.html', false);
    req.send();
    if(req.status == 200) {
        document.write(req.responseText);
    }
</script>