开发者

Call Webservice from HTML Page

How 开发者_StackOverflow社区we can call webservice from html page using javascript


  1. Because of same origin restrictions, you might need to use JSONP through script injection.

  2. Of course if you are talking a Web Service on the same origin, just use AJAX.

  3. Through an web browser extension


using jQuery:

$.ajax({ 
    type: "POST", 
    contentType: "application/json; charset=utf-8", 
    url: "WebService.asmx/WebMethodName", 
    data: "{}", 
    dataType: "json"
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜