jquery选择器通配符

/*查询id以code开头的input标签*/

$("input[id^='code']");

/*查询id以code结尾的input标签*/

$("input[id$='code']");

/*查询id包含code的input标签*/

$("input[id*='code']");

 

//表格奇偶选择

 $("tbody tr:even"); //选择索引为偶数的所有tr标签

 $("tbody tr:odd"); //选择索引为奇数的所有tr标签 

 

posted @ 2018-01-02 19:39  ぃSolitary_boy  阅读(90)  评论(0编辑  收藏  举报