XML parsing in jquery doesn't seem to work for me

后端 未结 1 1088
伪装坚强ぢ
伪装坚强ぢ 2021-01-28 02:52

I have a static html page weather.html



    
    

        
相关标签:
1条回答
  • 2021-01-28 03:20

    You cannot access distant domains using AJAX. See Same Origin Policy. You are trying to access a script located on google.com, so unless this is page is on hosted on this same domain it won't work. The only way to make this work is to setup a proxy server script on your server to which you will send the AJAX call and it will delegate the call to google.com. Another alternative is to use JSONP but the distant script needs to support it.

    0 讨论(0)
提交回复
热议问题