微信緩存以及蘋果手機沒法返回上一頁以及history不識別(前端網備份)

window.addEventListener('pageshow', function(e) {
var da = history.length;
console.log(history.length);//監聽history返回的是數字
getData();
});html

function getData(){
  $.post("/myteam/getData.json?time="+new Date().getTime(),function(data){
       // console.log(data);
        if(data.code == 0){
          var dl=data.data;
         // console.log("dl",dl);
          $(".us_ul .weui-cells").html("");
          for(var i=0; i<dl.length; i++){
            console.log("dlf",dl);
            var count = dl[i].count;
            var id = dl[i].id;
            var name = dl[i].name;
            //console.log(deviceId);/*<strong>編碼:</strong><span>'+deviceId+'</span> */
           /*$(".us_ul .weui-cells").append('<a href="/team/addMember.html"><li id="'+id+'">'+name+' (<span>'+count+'</span>) <i onclick="del(\''+id+'\')"><img src="../images/user2.jpg" alt=""></i> </li></a>');*/
           $(".us_ul .weui-cells").append('<a id="'+id+'" class="weui-cell weui-cell_access"><div onclick="tz(\''+id+'\')" class="weui-cell__bd"><p>'+name+' (<span>'+count+'</span>) </p></div></a>');
          }
        }
       },"json");
相關文章
相關標籤/搜索