zoukankan      html  css  js  c++  java
  • jquerymobile知识点:动态Grid的绑定以及刷新

    下面jquerymobile是ajax动态绑定和刷新的例子。直接上图以及代码。

    下面是实例代码:

    //初始绑定
        function GetInitBind(PageIndex, PageSize, sqlwhere, OrderType) {
            showLoading();
            var adapGrid = $("#adapGrid");
            $.ajax({
                type: "POST",
                url: "/Ashx/YouHui.ashx?MethodName=GetSealsList&PageSize=" + PageSize + "&PageIndex=" + PageIndex + "&date=" + new Date().getTime() + "&SqlWhere=" + sqlwhere + "&OrderType=" + OrderType,
                data: "",
                dataType: "json",
                success: function (data) {
                    data = eval(data);
                    var strleft = "";
                    $.each(data.List, function (i, item) {//打折商品列表
                        if (i % 2 == 0) {
                            strleft += "<div class='ui-block-a' style='height:100%'>";
                            strleft += "<img style='99%;' src='" + item.YouhuiFilepath + "'/>";
                            strleft += "<a class='descriptions'>";
                            strleft += "<p>剩余时间:" + unescape(item.Day) + "</p>";
                            strleft += "</a>";
                            strleft += "</div>";
                        } else {
                            strleft += "<div class='ui-block-b' style='height:100%'>";
                            strleft += "<img style='99%;' src='" + item.YouhuiFilepath + "'/>";
                            strleft += "<a class='descriptions'>";
                            strleft += "<p>剩余时间:" + unescape(item.Day) + "</p>";
                            strleft += "</a>";
                            strleft += "</div>";
                        }
                    });
                    adapGrid.append(strleft).trigger("create");//重要(刷新)
                },
                error: function (data) {
                   // $("#goodlist").html("数据有误!");
                }
            });
            hideLoading();
        }
  • 相关阅读:
    BERT 简介 P1_李宏毅
    GAN_P4 Learning from Unpaired Data_李宏毅
    GAN_P3_李宏毅
    Generation P1_李宏毅
    GAN_P2_Theory behind GAN_李宏毅
    李宏毅_Transformer p2
    李宏毅_Transformer p1
    强类型数据集 官方教程
    网页管理系统一
    读张子阳的用户验证自定义IPrincipal和IIdentity有感
  • 原文地址:https://www.cnblogs.com/dekevin/p/4220476.html
Copyright © 2011-2022 走看看