2011-08-12 3 views
0

내가 ... 3 개 가지 브라우저에서이 테스트를하고 확인을 내가 아약스 호환성 질문이 사파리에만 작동

에게 최신 사파리, 최신 파이어 폭스 최신 구글 크롬 ...

문제는이 스크립트가 Safari에서만 작동합니다 ... 왜 그런지 알고 있습니까?

<html> 
<head> 
    <script src="http://code.jquery.com/jquery-latest.js"></script> 
</head> 
<body> 

<script> 

$.ajax({ 
    type: "GET", 
    url: "http://www.nfl.com/liveupdate/scorestrip/ss.xml", 
    dataType: "xml", 
    success: function(xml) { 
     // Interpret response 
     $(xml).find('g').each(function() { 

      // Example: Show the XML tag in the console 
      console.log(this); 

      // Example: Put some output in the DOM 
      $("#divOutput").append($(this).attr("hnn")); 

     }); 
    } 
}); 

아웃풋은 사파리를 위해 완벽하게 작동하지만 다른 브라우저에서는 아무 것도 출력하지 않습니다. 당신이 nfl.com에서 실행하지 않는 한

<div id="divOutput"></div> 

</body></html> 

답변

0

, 당신은 AJAX 요청 크로스 사이트를 만들 수 없습니다.

그래도 시도해보십시오. RSS reading jquery plugin.

관련 문제