我想從公共webservice獲得任何數據http://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx?WSDL 但是出了點問題。每次我收到「0錯誤」失敗警報消息。任何人都可以幫忙嗎?Jquery WebService
<!DOCTYPE html>
<html>
<head>
<script src="Scripts/jquery-1.8.3.min.js"></script>
</head>
<body>
<input type="button" id="hello" value="Get data."/>
<script>
$("#hello").click(function() {
$.support.cors = true;
$.ajax({
type: "POST",
url: "http://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx/EnumValutes",
data: "{Seld : False}",
datatype: "xml",
success: function (msg)
{
Successfullcalling(msg);
},
error: Failurecalling
});
});
function Successfullcalling(res)
{
alert("Done!");
}
function Failurecalling(res)
{
alert(res.status + ' ' + res.statusText);
}
</script>
</body>
</html>
可能重複的問題http://stackoverflow.com/questions/5551423/calling-wsdl-service-via-jquery – SubRed