有人知道 dijit.MenuItem 标签的自定义 CSS 选择器吗?
这是添加 dijit.MenuItem 的 js:
dojo.forEach(basemapGallery.basemaps, function(basemap) {
//Add a menu item for each basemap
dijit.byId("bingMenu").addChild(new dijit.MenuItem({
label: basemap.title,
iconClass: basemap.title,
onClick: function(){basemapGallery.select(basemap.id)}
}));
});
这是静态html:
<td align="center" style="width: 50px;" valign="middle">
<button id="dropdownButton" iconClass="btnImgBaseMap" title="Switch Basemap" dojoType="dijit.form.DropDownButton">
<div dojoType="dijit.Menu" id="bingMenu">
<!--The menu items are dynamically created using the basemap gallery layers-->
</div>
</button>
</td>
谢谢!!