function getDate1(JsonpCallBack,curPage ,id) { var pid = $("#"+id).attr("data-gid"); var onlinetownType=""; var townItemType ="0"; $ .ajax({ type : "get",//使用post方法访问后台 url : "http://app.dg.gov.cn/u/wsbs/index?isflag=where",//要访问的后台地址 data : { "page" : curPage, "onlinetownType" : onlinetownType, "townItemType" : townItemType, "fag":"1", //"itemName" : encodeURIComponent(keyword), "pid":pid },//要发送的数据 dataType : "jsonp", jsonp : "JsonpCallBack", jsonpCallback : JsonpCallBack, beforeSend: function(){ $("#"+id).append(' 加载中.'); }, success : function(json) {//data为返回的数据,在这里做数据绑定 $("#"+id).find(".jzz").hide(); var html = ""; if (!jQuery.isEmptyObject(json)){ $.each(json.list,function(i, item) { html +='
  • '; html +='
    '; html +='
    '; html +='' + item.itemName + ''; html +='
    '; html +='
    服务部门:'+item.groupName+'
    '; html +='
    '; html +='
  • '; }); } $("#"+id).append(html); }, error : function() { $("#"+id).append("暂无数据"); } }); } function cwbsd(JsonpCallBack,id){ var gid = $("#"+id).attr("data-gid"); $.ajax({ url : "http://app.dg.gov.cn/u/wsbs/cmbsd", type : "GET", data : { "gid":gid }, // dataType : "json", dataType : "jsonp", jsonp : "JsonpCallBack", jsonpCallback : JsonpCallBack, beforeSend: function(){ $("#"+id).append(' 加载中.'); }, success : function(json) { if (!jQuery.isEmptyObject(json)){ $("#"+id).find(".jzz").hide(); var html = ""; if (json.list.length>0){ $.each(json.list, function(i) { //var obj = json.list[i]; html +='
  • '+json.list[i].name+'
  • '; }); }else{ $("#"+id).append("暂无数据"); } $("#"+id).append(html); } } }); }