错误是这样的:function PopeEndow(ppdef){
this.ppdef=ppdef;
this.id=ppdef.Elems[0];
this.type=ppdef.Elems[1];
this.res=ppdef.Elems[2];
this.rela=ppdef.Elems[3];
this.cColumn=ppdef.Elems[4];
this.intial=ppEdwIntial;
this.hasRela=(this.type==2);
this.BindRela=BindRela;
this.RelaLoaded=false;
this.Relas=new Array();
}
我在主页面的一个iframe里载入一个页面,这个页面执行
parent.mAddRela("&rs(0)&",'"&rs(1)&"',"&popeid&")
就是这个函数:
function mAddRela(cID,cCol,popeid){
EndowMap[popeid].AddRela(cID,cCol);
}
然后在代码里调用这个function BindRela(),但是this.Relas=new Array();的Relas数组还是空的,如果在点一次,因为有一个Relaloaded属性在上次载入iframe时已经置为true这时
bindRela能够正常执行数组也有东西了,为什么,是不是iframe的问题,郁闷了两天了
还是我的代码本身有问题呢,我太希望是后者了,可是我现在方寸已乱,所以来求助,没有注释是因为这个项目只有我一个人在做,我知道这样不好,以后一定改,先谢谢了