当前位置:首页>维修大全>综合>

jquery怎么获取select选中的值 默认选中

jquery怎么获取select选中的值 默认选中

更新时间:2023-04-20 07:12:52

jquery怎么获取select选中的值 默认选中

jquery获取select的option个数有两种方法:

1、dom方式获取option长度:

$("#selecttype")[0].options.length;

2、利用层级选择器获取option长度

$("#selecttypeoption").length

更多栏目