我正在使用来自:http ://abeautifulsite.net/notebook/62 的 jquery 多选控件
我需要通过 javascript 在特定事件上手动检查其中一个选项。
每当我尝试更改选中的属性或触发单击、显式调用单击函数等时,我都会选中复选框,但 CSS 从未更改,并且文本框从未使用当前选定的元素刷新。
示例:如果我想使用 javascript 代码选择具有“TRA”值的复选框并确保其行为正常,我该如何实现?
<input class="multiSelect" type="text" style="cursor: default;" value="" readonly="readonly"/>
<div class="multiSelectOptions" style="position: absolute; z-index: 99999; display: none;">
<label class="selectAll">
<input class="selectAll" type="checkbox"/>
(All)
</label>
<label>
<input type="checkbox" value="ADP" name="Attributes"/>
Adaptation
</label>
<label>
<input type="checkbox" value="TRA" name="Attributes"/>
Translation
</label>
</div>