//页面A
mui('.mui-table-view').on('tap', '.next', function() {
var id = this.getAttribute('data-id');
mui.openWindow({
url: 'nextusercenter.html?id=' + id, //携带参数id跳转下个页面
id: 'nextusercenter.html',
styles: {
top: '0px',
bottom: '0px'
},
show: {
aniShow: 'none',
}
})
})
//公用JS
//获取地址栏后的参数方法
function _get(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r != null) return unescape(r[2]);
return null;
};
//页面B
mui.plusReady(function() {
var id = _get('id'); //使用该方法获取上级页面携带过来的参数id
console.log(id);
getPos(id); //得到参数传值到下个方法执行
});
});