jquery 獲取select數(shù)組與name數(shù)組長度的實現(xiàn)代碼
可以用size() 或者options.length
$("#name")[0].options.length;或document.getelementbyid("#name").options.length;
$("#name option").size()
name:
$("select[name=name]").size();
option:
$("#name option").size();
以上這篇jquery 獲取select數(shù)組與name數(shù)組長度的實現(xiàn)代碼就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持武林網。
新聞熱點
疑難解答