我想做一個菜單,我甚至不能運行這個示例代碼出於某種原因!在firbug錯誤是:Dojo DropDownMenu,找不到類
Could not load class "dijit.DropDownMenu"
每隔道場菜單相關類的工作,我測試了通過刪除部分代碼如下,看看別的不渲染。
<div data-dojo-type="dijit.MenuBar" id="actionMenu">
<div data-dojo-type="dijit.PopupMenuBarItem">
<span>File</span>
<div data-dojo-type="dijit.DropDownMenu" id="fileMenu">
<div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('file 1');}">File #1</div>
<div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('file 2');}">File #2</div>
</div>
</div>
<div data-dojo-type="dijit.PopupMenuBarItem">
<span>Edit</span>
<div data-dojo-type="dijit.DropDownMenu" id="editMenu">
<div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('edit 1');}">Edit #1</div>
<div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('edit 2');}">Edit #2</div>
</div>
</div>
任何人都可以指出爲什麼?我已經使用了follwoing require語句
dojo.require("dijit.MenuBar");
dojo.require("dijit.PopupMenuBarItem");
dojo.require("dijit.DropDownMenu");
dojo.require("dijit.MenuItem");
我有嘗試是的,我也無法加載'dijit.DropDownMenu'。 你能把它改成'dijit.form.DropDownButton'嗎? – OammieR 2012-02-20 04:37:00