2017-06-06 49 views

回答

0

使用這種$("#selector-id :selected").length;獲得所選選項

function tdClick(value){ 
 
var no = 3; 
 
$("#selector_id").on("change", function() { 
 
    
 
    var count = $("#selector_id :selected").length; 
 
    
 
    if(count>3){ 
 
     // your logic 
 
    } 
 
    
 
});

長度