api.js 页面跳转如何传参数接收参数
js方法
function next (type) {
var mobile = $api.val($api.byId('mobile'));
var code = $api.val($api.byId('code'));
api.openWin ({
name: type,//必须有name
url: './update.html',
pageParam: {
mobile : mobile,
code : code}//传递参数
});或者
api.openFrame({
name: 'page2',
url: './page2.html',
rect:{
x:0,
y:0,
w:320,
h:480
},
pageParam: {name: 'test',sex:'女'}, //传递参数
bounces: true,
bgColor: 'rgba(0,0,0,0)',
vScrollBarEnabled:true,
hScrollBarEnabled:true
});新页面接收参数
var id= api.pageParam.name;
本文原创,转载必追究版权。


