jquery ajax代碼可以從另一個域名或其他網站調用web服務嗎?
像這樣:
可以jquery ajax調用外部web服務?
$.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);}
});
,我應該如何配置此WebService?
我沒有代表進行編輯,但你應該Greasemonkey的正確拼寫。 – Benson 2009-04-07 19:17:43