天天看點

html接口參數傳遞,api.js 頁面跳轉如何傳參數接收參數

html接口參數傳遞,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;玲玲部落格http://www.swzhinan.com/

本文由站長原創或收集,不代表本站立場,如若轉載,請注明出處:http://www.swzhinan.com/post/220.html