您好我已经设置了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);
});
克莱门特
答案 0 :(得分:0)
小部件的onChange
事件就是您想要的。
on(select_Card, 'change', function(newValue){
alert(newValue);
});