ajax实例

前端之家收集整理的这篇文章主要介绍了ajax实例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
function lists() {  
whereInfo.uid= params["uid"]
get(apistore.AD_GEREN,whereInfo,function (r) {
      if (r.code == 0 && r.data.length > 0) {
             var str = "";          
                $.each(r.data,function (i,v) {
                    var typeStr = "";
                    if (v.type == 10){
                        typeStr = "取现支出"
                        } else if (v.type == 12){
                        typeStr = "余额转积分"
                        }
                    str += "<tr>";
                    str += "<td>" + v.bankuser + "</td>";
                    str += "<td>" + v.score/100 + "</td>";
                    str += "<td>" + typeStr + "</td>";
                    str += "<td>" + $.myTime.UnixToDate(v.time) + "</td>";
                    str += "</tr>"
                });
                $('#tbody').html(str);


            } else {
                isLoadAll = 1;
            }
    })
 }

猜你在找的Ajax相关文章