dojo的api案例中也有类似的添加方法,但是在实际中需要稍作修改,其中html中代码如下:
<div dojoType="dijit.layout.ContentPane" style="width: 100%;height: 100%;" dojoAttachPoint="contenPaneDiv"> <div dojoAttachPoint="accor" style="height: 100%;width :100%;" dojoType="dijit.layout.AccordionContainer" id="${id}_accordion"> </div> </div>
dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.layout.AccordionContainer");
//testTitle 模块的标题 var content = new dijit.layout.ContentPane({id:id,style:"padding:0px;height:100%;",title:"testTitle"}); content.startup(); this.accor.addChild(content); this.accor.startup(); this.accor.resize();//如果不执行此方法,会出现显示异常的情况原文链接:https://www.f2er.com/dojo/291065.html