|

楼主 |
发表于 2016-12-5 08:52:22
|
显示全部楼层
目的是从index.js中将地址中输入的参数id传给main页面。在index.js中
Model.prototype.modelLoad = function(event) {
var s=this.getContext().getRequestParameter('id');
justep.Shell.showPage("main",{'id':s}); //该条语句除 ,{'id':s} 外,是自动生成的。增加,{'id':s}目的是传参给main页面
};
main页面中:
Model.prototype.modelParamsReceive = function(event){
var d=this.params.id;
不能获取id参数,id,d都为undefined。将index页面中的justep.Shell.showPage("main",{'id':s});改为justep.Shell.showPage("main",{id:s});
或改为justep.Shell.showPage("main",{.keyValue:s});
都不行。
各位高手,看看问题在哪? |
|