本文介绍了调用webservice时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
现在,我想使用来自http://www.webservicex.net/globalweather.asmx的服务来通过javascript获取天气。我试试这段代码:
https://gist.github.com/phuong1492/565be0e13df60d1ecaef
并且出现错误No'Access-Control-Allow-Origin'标题是出现在请求的资源上。因此不允许原点'null'访问。
Now, i want to use service from http://www.webservicex.net/globalweather.asmx to get weather by javascript. I try this code:
https://gist.github.com/phuong1492/565be0e13df60d1ecaef
And have error "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. "
推荐答案
这篇关于调用webservice时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!