[LayaAir 1.0]如何将原生iframe嵌入某个节点,像addChild那样嵌入
HallView.prototype.OnClickOneGou=function(){
this.frame=Laya.Browser.document.createElement("iframe");
this.frame.width=this.con.width;
this.frame.height=850;
this.frame.style.margin="0";
this.frame.style.padding="0";
this.frame.style.left="0";
this.frame.style.top="50px";
this.frame.id="OneGou";
this.frame.style.position="absolute";
this.frame.style.zIndex=100;
this.frame.src="http://www.baidu.com";
Laya.Browser.document.body.appendChild(this.frame);
// this.con.addChild(this.frame);希望嵌入到this.con这个子节点,怎么处理?
}
this.frame=Laya.Browser.document.createElement("iframe");
this.frame.width=this.con.width;
this.frame.height=850;
this.frame.style.margin="0";
this.frame.style.padding="0";
this.frame.style.left="0";
this.frame.style.top="50px";
this.frame.id="OneGou";
this.frame.style.position="absolute";
this.frame.style.zIndex=100;
this.frame.src="http://www.baidu.com";
Laya.Browser.document.body.appendChild(this.frame);
// this.con.addChild(this.frame);希望嵌入到this.con这个子节点,怎么处理?
}
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Yangcy
赞同来自: