我需要编写代码来对列表执行某些操作,具体取决于从Dojo中的Checked Multi Select(“ dojox.form.CheckedMultiSelect”)中选择的选项。在dojo中选择一个(或多个)选项时,如何编写条件?
<select multiple="true" name="multiselect" data-dojo-type="dojox.form.CheckedMultiSelect" data-dojo-
attach-point="mslt" dropDown="true">
<option value="one" selected="selected" data-dojo-attach-point="chkWQT">Option-1</option>
<option value="two" selected="selected" data-dojo-attach-point="chkWQL">Option-2</option>
</select>
Javascript:
if (//Option-1 is selected) {
layerList.push.apply(List, Resources_GRP);
}
var opt = this.mslt.getOptions();
if (opt[1].selected) {
//Statement
}