在mui中,怎么传递list列表中的值到另一个页面
- 首先在list列表中对list的id赋予你想传递的值
var li = document.createElement('li');
li.className = 'mui-table-view-cell';
li.id = item.signgeobd;
li.innerHTML = "<div class='mui-table'>"
+ "<div class='mui-table-cell mui-col-xs-2 mui-text-center'><span class='mui-h5'>"
+ (index+1)
+ "</span></div><div class='mui-table-cell mui-col-xs-10'><h5 class='mui-ellipsis'>签到终端:"
+ signsituationstr
+ "</h5><h5 class='mui-ellipsis'>签到类型:"
+ signintypestr
+ "</h5><h5 class='mui-ellipsis'>签到结果:"
+ isvalidstr
+ "</h5><h5 class='mui-ellipsis'>签到时间:"
+ item.signtime
+ "</h5><h5 class='mui-ellipsis'>是否定位:"
+ issigngeo
+ "</h5></div></div>";
table.appendChild(li);
2.获取id值并传递到指定的页面
mui(".mui-table-view").on('tap','.mui-table-view-cell',function(){
//获取id
var id = this.getAttribute("id");
if(id != undefined || id != ''){
mui.openWindow({
url: 'locationCheck.html',
id: 'locationCheck.html',
extras: {
signgeobd: id
}
})
}else {
mui.toast('');
}
3.到调转后的页面获取传过来的参数
var map = new BMap.Map("allmap");
var signge = plus.webview.currentWebview().signgeobd; //注意:signgeobd要与传递页面一致
var sig = signge.split(",");
Ing = sig[0];
Lat = sig[1];
console.log(signge)
var point = new BMap.Point(Ing,Lat);
var point1;
var marker;
var deptcode;
4.注意