google.com を正常に取得したい、jquery を使用するかどうかは気にしない、何らかの方法で取得したい (つまり、javascript ライブラリを使用しなくても問題ありません。たとえば、XMLHttpRequest も問題ありません)。jquery をロードするローカル マシンの test.html ページからコンソールに入力した ajax 呼び出しの例を次に示します。
var url = 'http://google.com';
$.ajax({
type: 'GET',
url: url,
error: function(req, resp) {
console.log('Error fetching ' + url);
console.log("req:");
console.log(req);
console.log("resp:");
console.log(resp);
},
success: function(data) {
console.log("success! here's the data:");
console.log(data);
}
});
あなたの助けは大歓迎です!