嗨,我已经设置了 dijit/select,但问题是我不确定在选择时要捕获并指示值。我见过 dijit/form select、dojo.query 和 dojo/on。但我仍然无法想出解决方案。你能建议吗?谢谢
var select_Card = new Select
(
{name:'select_PCBA',
options:
[
{label:"<span id='NotinUse'><b>   . . .</b></span>", value:"", selected:true},
{label:"<span id='NotinUse'><b>  A Card</b></span>", value:"a" },
{label:"<span id='inUse'><b>  B Card</b></span>", value:"b"},
{label:"<span id='NotinUse'><b>  C Card</b></span>", value:"c"},
{label:"<span id='NotinUse'><b>  D Card</b></span>", value:"d"},
{label:"<span id='NotinUse'><b>  E Card</b></span>", value:"e"},
], style:{width:'150px'}
},"select_Card");
var card = dom.byId('inUse');
on(card,'click', function(evt)
{
alert('Item selected is'+ card.value);
});
克莱门特