有多個選擇元素:長度的選擇多的選擇的選項始終返回1
<select id="secta_code" name="secta_code[]" multiple="multiple" size="10"></select>
$(document).ready(function() {
$('#secta_code').on('change',function() {
alert("nb = "+$(this,"option:selected").length);
});
});
如何動態地趕上的處理程序中選擇選項的數量?
這一次,我不得不使用'find'呢:) – pheromix 2014-09-28 14:02:35