如何在远程服务器上使用jquery调用webservice? [英] how to call webservice using jquery on remote server?
本文介绍了如何在远程服务器上使用jquery调用webservice?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个html页面,其中使用jquery调用了webservice.
它可以在本地工作,但在远程服务器上则不能工作.
这是javascript
中使用的代码
I have created one html page,in that using jquery i have call webservice .
It will work locally ,but on remote server it can not works.
This is the code using in javascript
$.ajax({
type: "POST",
url: "http://example.com/test.asmx/helloworld",
data: "{'bannerid':'" + id + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
//$(divid1).removeClass('loading');
$(divid1).html(msg)
}
});
推荐答案
.ajax({ 类型:" , 网址:" , 数据:"
.ajax({ type: "POST", url: "http://example.com/test.asmx/helloworld", data: "{'bannerid':'" + id + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { //
(divid1).removeClass('loading');
(divid1).removeClass('loading');
(divid1).html(msg) } });
(divid1).html(msg) } });
这篇关于如何在远程服务器上使用jquery调用webservice?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文