[英]fetch checked value from multiselect checkbox in jquery
I have given html 我给了html
<ul class="ui-multiselect-checkboxes ui-helper-reset" style="height: 175px;">
<li class=" ">
<label class="ui-corner-all" title="" for="ui-multiselect-opps-option-0">
<input type="checkbox" title="" value="All" name="opps" id="ui-multiselect-opps-option-0">
<i>All</i>
</label>
</li>
<li class=" ">
<label class="ui-corner-all" title="" for="ui-multiselect-opps-option-1">
<input type="checkbox" title="" value="1" name="opps" id="ui-multiselect-opps-option-1">
<i>John</i>
</label>
</li>
<li class=" ">
<label class="ui-corner-all" title="" for="ui-multiselect-opps-option-2">
<input type="checkbox" aria-selected="true" checked="checked" title="" value="3" name="opps" id="ui-multiselect-opps-option-2">
<i>Tim</i>
</label>
</li>
<li class=" ">
<label class="ui-corner-all" title="" for="ui-multiselect-opps-option-3">
<input type="checkbox" aria-selected="true" checked="checked" title="" value="2" name="opps" id="ui-multiselect-opps-option-3">
<i>Tom</i>
</label>
</li>
</ul>
and have included given jquery code 并包含给定的jQuery代码
$("input[id^='ui-multiselect-opps-option']").attr('checked').val();
but its not fetching checked values please guide me how to fetch multiselect checked values through jquery. 但它不提取检查值,请指导我如何通过jquery提取多选检查值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.