Can jquery ajax code call a webservice from another domain name or another website?
Like this:
$.ajax({
type: "POST",
url: "http://AnotherWebSite.com/WebService.asmx/HelloWorld",
data: "{'name':'" + $('#price').val() + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) { alert(msg); }
});
And how should I config this webservice?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…