원격 URL을로드하려고합니다 (원격 페이지가 있는지 테스트)..ajax()를 사용하여 원격 URL로드 - 작동하지 않음
이 잘 작동합니다 :
$(function() {
$.ajax({
url:'http://www.google.com/',
type: 'html',
success: function(content,code) {
alert(code);
$('body').html(content);
}
});
});
그렇게 할 수있는 방법이 있나요 :
$(function() {
$.ajax({
url:'localtest.html',
type: 'html',
success: function(content,code) {
alert(code);
$('body').html(content);
}
});
});
그러나 스왑 원격 URL과 나는 아무 것도 얻을 수 없다?
오류는 무엇입니까? Firebug를 사용하여 오류가 무엇인지 확인 했습니까? – Steve