我的页面中有以下代码,用于创建新的 Dojo/Dijit TabContainer。
<div dojoType="dijit.form.ComboButton" iconClass="dijitIconEdit">
<span>
Blank
</span>
<div dojoType="dijit.Menu">
<div dojoType="dijit.MenuItem" iconClass="dijitIconEdit">
Letter to Client
<script type="dojo/method" event="onClick">
newLetterToClientPane = dojox.layout.ContentPane({ title:'New Letter to Client', href:'some_url', closable:true })
dijit.byId('mainTabs').addChild(newLetterToClientPane)
</script>
</div>
<div dojoType="dijit.MenuItem" iconClass="dijitIconEdit">
Letter to Company
<script type="dojo/method" event="onClick">
newLetterToCompanyPane = dojox.layout.ContentPane({ title:'New Letter to Company', href:'some_url', closable:true })
dijit.byId('mainTabs').addChild(newLetterToCompanyPane)
</script>
</div>
</div>
</div>
这一切都很好。我只是想知道如何给新的 TabContainer 一个 ID,因为我需要稍后在脚本中重新填充,但我不能用 out 和 ID 来做到这一点。我只是问,因为dojox.layout.ContentPane和dijit.layout.ContentPane上的 Dojo 页面没有提及它。