Ajax+Asp源代码]读取数据库内容的表格(没有用框架)第1/2页

2019-09-14 07:28:39王冬梅

    }else{                                                            //如果http状态为404--http报错.
        document.getElementById("Status").innerHTML = "Error:" + request.status;
        document.getElementById("Pages").innerHTML = "Previous│Next";
    }
    }
}

//***********处理完成-生成数据.**********************************************************************************

function requestAllright() {
    var getStr = request.responseText;
    var getValue = getStr.split(",");
    var PageCount = getValue[0];
    var PageNow = getValue[1];

    var Contact = [
    [getValue[2],getValue[3],getValue[4],getValue[5]],
    [getValue[6],getValue[7],getValue[8],getValue[9]],
    [getValue[10],getValue[11],getValue[12],getValue[13]]
    ];

    for (var List=0;List<Contact.length;List++){
      var MyTr = MyTable.insertRow();                                         //创建Tr标签                                             
      for (var Cell=0;Cell<Contact[List].length;Cell++){                     //Td循环
      var MyTd = MyTr.insertCell();                                             //创建Td标签
      MyTd.innerHTML = Contact[List][Cell];                                     //给Td标签插入内容