select
让根据值选择option
根据值
$("select[name='sel'] option[value=2]");
根据显示值
$("select[name='sel'] option:contains('22222')");
获取选中状态的option
$("select[name='sel'] option:selected");
$("select[name='sel'] :selected");
分别val(),text();获取值和显示值
获取选中option的索引 selectedIndex
radio
根据值找元素
$("input[name='sex']").filter("[value='2']");
("input[name='sex'][value='2']"); //filter和选择器里可写[attr1=v1][attr2=v2][attr2=v2]
获取选中的radio元素
$("input[name='sex']:checked ");
checkbox
根据value定位定位元素
$("input[name='lan[]'][value=2]");
查看一个checkbox是否被选中 obj.is(':checked')
获取选中的个数
$("input:checkbox[name='field[]']:checked").length()
select根据value查找需要空格
radio里的Input根据value查找不需要空格