Ext.Ajax.request({  
                url : urlStr,  
                params : paramsObj,  
                method : 'POST',  
                success : function(response) {  
                    if (callbackFunc) {  
                        var result = Ext.util.JSON  
                                .decode(response.responseText);  
                        var cbfn = callbackFunc.createCallback(result);  
                        cbfn();  
                    }  
                },  
                failure : function() {  
                    Ext.Msg.alert("提示", "方法调用失败");  
                }  
            });  
 
Jquery ajax 的 $.ajax(),$.post(),$.get(),$.getJSON();
$.ajax({

                    type: "post",

                    url: "JqueryCSMethodForm.aspx/GetNowDate",

                    datatype: "json",

                    contentType: "application/json; charset=utf-8",

                    success: function(data) {

                        $("input#showTime").val(eval('(' + data.d + ')')[0].nowtime);

                    },

                    error: function(XMLHttpRequest, textStatus, errorThrown) {

                        alert(errorThrown);

                    }

                });

 

jQuery.post( url [, data] [, success(data, textStatus, jqXHR)] [, dataType] )

http://api.jquery.com/jQuery.post/
 

 

jQuery.get( url [, data] [, success(data, textStatus, jqXHR)] [, dataType] )

$.get("test.cgi", { name: "John", time: "2pm" },
   function(data){
     alert("Data Loaded: " + data);
   });

 


$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",
  {
    tags: "cat",
    tagmode: "any",
    format: "json"
  },
  function(data) {
    $.each(data.items, function(i,item){
      $("<img/>").attr("src", item.media.m).appendTo("#images");
      if ( i == 3 ) return false;
    });
  });








相关文章:

  • 2022-12-23
  • 2022-02-07
  • 2021-08-02
  • 2022-01-04
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2021-11-29
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2021-12-23
  • 2021-05-30
相关资源
相似解决方案