I’ve a URL that its contents are also JavaScript codes, I want to get the contents of this URL via JavaScript something like to file_get_contents() in PHP and show them to the user using the alert() function.
I’ve a URL that its contents are also JavaScript codes, I want to get
Share
You can use XMLHttpRequest in Javascript to fetch datas from an external URL. Here is a good resource : http://www.w3schools.com/ajax/default.asp (I usually don’t recommend them, but the AJAX tutorial is really good).
Also, this had to be there :