每次从excel中读取20条数据显示到页面上,如此循环,知道数据没有为止

    function ShowData(cishu, filename, ffcount, diquName, error) {
        $.post("/Ajax/ajax.aspx", { op: "Ajax.SampleInfoDaoRu", cishu: cishu, filename: filename, meicount: ffcount, diqu: diquName, errorC: error },
 function (data) {
     if (data != "" && data != null) {
        
         var kk = ffcount * (cishu - 1);
         for (var ff = 0; ff < datalength; ff++) {
             kk++;
            tableStr += "<tr><td>" + kk + "</td><td>" + data[ff].TiaoMaCode + "</td><td>" + data[ff].Name + "</td><td>" + data[ff].Sex + "</td><td>" + getAge(data[ff].Age) + "</td><td>" + formatTime(data[ff].Age) + "</td><td>" + data[ff].EHRCode + "</td><td>" + data[ff].SFZCode + "</td><td>" + data[ff].TiJianCode + "</td><td>" + data[ff].NongBaoCode + "</td><td>" + data[ff].YiBaoCode + "</td><td>" + data[ff].Address + "</td><td>" + formatTime(data[ff].QuYangDate) + "</td><td>" + data[ff].JianYanMuDi + "</td><td>" + data[ff].BiaoBenSource + "</td></tr>";
             $(".ScrollBarBox tbody").append(tableStr);
             tableStr = "";

         }
         count = kk;
         ShowData(cishu + 1, filename, ffcount, diquName, errorCount);
     }

 }, "json");
    }

 

posted on 2013-03-26 13:35  弥丝  阅读(180)  评论(0编辑  收藏  举报