zepto 获取select选中的值

jQuery中典型的方法:

$('option[selected]')

不管用,因为selected并不是CSS标准。
 
因此,在zepto中想要获取select元素中选中的option,需采取如下方法:
// get OPTION elements for which `selected` property is true
$('option').not(function(){ return !this.selected })

或者推荐

 $("#ID").val() //获取选中的value   

$("#ID option").eq($("#ID").attr("selectedIndex")).text() //获取选中的文本值  

参考资料:https://github.com/madrobby/zepto/issues/503

原文地址:https://www.cnblogs.com/luckythan/p/4673181.html