These are the line items in a Menu Widget. The display for the MenuItem consists of 3 columns namely Label, Icon and the Accelerator key. Although Menu can display accelerator keys there is no infrastructure currently to actually catch and execute these accelerators. The developer is responsible for the key event handler to support this.
<scripttype="text/javascript">dojo.require("dijit.MenuBar");dojo.require("dijit.MenuItem");varpMenuBar;functionfClickOne(){alert("You clicked on Menu Item #1")};functionfClickTwo(){alert("You clicked on Menu Item #2")};dojo.addOnLoad(function(){ExampleMenu=newdijit.Menu({id:"SampleM"});ExampleMenu.addChild(newdijit.MenuItem({label:"Always Visible Menu",disabled:true}));ExampleMenu.addChild(newdijit.MenuItem({label:"Item #1",onClick:fClickOne,accelKey:"Shift+O"}));ExampleMenu.addChild(newdijit.MenuItem({label:"Item #2",onClick:fClickTwo,disabled:true,accelKey:"Shift+T"}));ExampleMenu.placeAt("wrapper");ExampleMenu.startup();});</script>
<divid="wrapper"></div>
Creation from markup is more simpler and structured.