var XHR = ("onload" in new XMLHttpRequest()) ? XMLHttpRequest : XDomainRequest; var xhr = new XHR(); xhr.open('GET', 'https://prostopogoda.ru/informer2.js?code=kasan&s=rus&r=respublika_tatarstan&bgcolor=7393e0&tcolor=e2f8ff&scolor=97a6f2&font=Georgia&width=300px', true); xhr.onload = function() { document.getElementById("pp_informer2").innerHTML = this.responseText; } xhr.onerror = function() { document.getElementById("pp_informer2").innerHTML ='Ошибка!
Пожалуйста,Свяжитесь с prostopogoda.ru!'; } xhr.send();