<!-- 堆叠容器 --> <div dojoType="dijit.layout.StackContainer" id="stackContainer"> <div dojoType="dijit.layout.ContentPane" title="Stack 1"> This is the content in stack 1. </div> <div dojoType="dijit.layout.ContentPane" title="Stack 2"> This is the content in stack 2. </div> </div> <div dojoType="dijit.layout.StackController" containerId="stackContainer"></div>
<!-- 选项卡容器 --> <div style="width: 535px; height: 290px"> <div dojoType="dijit.layout.TabContainer" style="width: 100%; height: 100%;"> <div dojoType="dijit.layout.ContentPane" title="Tab 1"> This is the content in tab 1. </div> <div dojoType="dijit.layout.ContentPane" title="Tab 2"> This is the content in tab 2. </div> </div> </div>
<!-- 折叠容器 --> <div style="width: 535px; height: 290px"> <div dojoType="dijit.layout.AccordionContainer" style="width: 100%; height: 100%;"> <div dojoType="dijit.layout.ContentPane" title="Blade 1"> This is the content in blade 1. </div> <div dojoType="dijit.layout.ContentPane" title="Blade 2"> This is the content in blade 2. </div> <div dojoType="dijit.layout.ContentPane" title="Blade 3"> This is the content in blade 3. </div> </div> </div>
<!-- 边框容器布局 --> <div style="width: 535px; height: 290px"> <div dojoType="dijit.layout.BorderContainer" style="width: 100%; height: 100%;"> <div dojoType="dijit.layout.ContentPane" region="top" splitter="true"> This is the content in the top section. </div> <div dojoType="dijit.layout.ContentPane" region="left" style="width: 100px;" splitter="true"> This is the content in the left section. </div> <div dojoType="dijit.layout.ContentPane" region="center" splitter="true"> This is the content in the center section. </div> <div dojoType="dijit.layout.ContentPane" region="right" style="width: 100px;" splitter="true"> This is the content in the right section. </div> <div dojoType="dijit.layout.ContentPane" region="bottom" splitter="true"> This is the content in the bottom section. </div> </div> </div> <!-- 1、嵌套组件 --> <div dojoType="dijit.TitlePane" title="Color Picker"> <!-- 添加事件 --> <div dojoType="dijit.ColorPalette" onChange="alert(this.value)"> <script type="dojo/method" event="onChange" args="evt"> alert(this.value); </script> </div> </div> <!-- 2、嵌套组件 --> <div id="myTitlePane"> <div id="myColorPalette"></div> </div>
<script src="dojo-release-1.16.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script> <script> dojo.require('dijit.dijit') //Add Dijit components you are using here using dojo.require dojo.require('dijit._Calendar') dojo.require('dojox.form.Rating')