Пробовал, к примеру, такие варианты:
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>ajax test</title>
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
<script>
var XHR = ("onload" in new XMLHttpRequest()) ? XMLHttpRequest : XDomainRequest;
var xhr = new XHR();
xhr.open('GET', 'https://site-donor.ru', true);
xhr.onload = function() {
this.response;
}
xhr.onerror = function() {
alert( 'error ' + this.status );
};
xhr.send();
</script>
</body>
</html>
и
$.ajax({
type: 'GET',
headers: { 'Access-Control-Allow-Origin': 'https://site-donor.ru' },
url: 'https://site-donor.ru',
crossDomain: true,
dataType: 'text/html',
success: function(data) { alert("Success"); console.log(data);},
error: function(data) { alert("Error"); },
});
не работают, пишет
No 'Access-Control-Allow-Origin' header is present on the requested resource в консоли