标签:click listener cells his ons i++ console ESS 缓存
window.addEventListener(‘pageshow‘, function(e) {
var da = history.length;
console.log(history.length);//监听history返回的是数字
getData();
});
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" ></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");
微信缓存以及苹果手机无法返回上一页以及history不识别(前端网备份)
标签:click listener cells his ons i++ console ESS 缓存
原文地址:https://www.cnblogs.com/lsc-boke/p/10996915.html