我有一個容器元素,我在其中創建/ place()表單,然後另一個..等等。 我的目標是在它們之間切換,即全部隱藏並僅顯示活動表單。 它隱藏好了,但我不能顯示活動回來。Dojo:顯示()和隱藏()....如何?
我試着使用:
- .style.display(無< - >塊)和能見度(能見度< - >隱藏)
- dojo.style(...)
- 調整大小( )和啓動()的變化
- 其他幾個變種我從老道場的
沒有什麼工作上網後發現。 /我需要用它來顯示工作,所以它不會佔用space./
你能告訴我什麼是展示與道場()
又看了看這一個隱藏的正確方法: How do I dynamically show and hide an entire TabContainer using DOJO?
不起作用。
我使用的僞代碼是這樣的: ....
//find or create the FORM element
form = dijit.byId(...);
if(typeof form != 'object') {
form = dojo.create('form', ....);
dojo.place(form,'containerx','last');
}
//hide all
dojo.query('#containerx > *').forEach(function(item){
dojo.style(item, 'visibility','hidden');// and all other variants i mentioned
})
//show only the current form
dojo.style(form, 'visibility','visible');
//if the dojo form obj was already created, then skip it
if (this.form_obj) return;
....build the form and the elements....
this.form_obj.startup()
感謝名單
感謝名單會嘗試, – user1019129