How to get data from an url with javascript only

Viewed 20

Hi,

I have this code in jquery:

$(document).ready(function () {
   $.ajax({
     url: url,
     success: function(data){
      $(data).find("td > a").each(function(){
       var thefile = $(this).attr("href");
       
       typevar.push(thefile);
      }); 
     }
   });
  });

it lists all the content of a page from an URL. I want to translate this into pure javascript. Is it possible to do it and achieve the exact same result?

Thank you.

0 Answers
Related