一.jQuery选择器
二、基本选择器
基本选择器又可以分为三种,分别为
CSS选择器
层级选择器<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
if (window.location.toString().indexOf("shtml?") > 0) {
self.location = window.location.toString().replace(window.location.search.toString(), "");
}
function doccheckart(json) {
if (json[0].result == "1") {
self.location = "http://www.360doc.com/noarticle.aspx";
}
}
function doccheckarts(json) {
if (json[0].result == "1") {
var artidlist = json[0].artid;
if (artidlist != "") {
if (artidlist.indexOf(',') > -1) {
artidlist = artidlist.split(',');
} else {
artidlist = [artidlist];
}
$.each(artidlist, function (index, value) {
$('#artid_' + value).remove();
});
}
}
//console.log(json[0]);
}
</script>
<script src="/js/jquery1.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
function getCookie(name) //获取cookie值
{
var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
if(arr != null)
return unescape(arr[2]);
return null;
}
var patt1 = new RegExp("[0-9]*_[0-9]*");
var url = patt1.exec(location.href);
if (navigator.userAgent.toLowerCase().indexOf("micromessenger") > -1) {
window.location.href = "http://www.360doc31.net/wxarticlenew/" + url.toString().split("_")[1] + ".html";
}
else if (navigator.userAgent.indexOf("iPhone") > 0 || navigator.userAgent.indexOf("Android") > 0 || navigator.userAgent.indexOf("iPod") > 0) { //手机端跳转
if (url != "") {
self.location = "http://www.360doc.cn/article/" + url + ".html";
}
}
if ( 334970071 != 334970071) {
if(getCookie("360doc1")!=null)
{
$.ajax({
url: "http://www.360doc.com/ajax/getuserid.ashx",
async:false,
cache: false,
dataType: "json",
success: function (result) {
if (10504424 != result.userid) {
self.location = "http://www.360doc.com/content/13/1206/15/10504424_334970071.shtml";
}
}
});
}
else
{
self.location = "http://www.360doc.com/content/13/1206/15/10504424_334970071.shtml";
}
}
if ( 0 != 334970071&&"0"!=""&&"0"!="0"&&"0"!=1) {
$.ajax({
url: "http://www.360doc.com/ajax/getuserid.ashx",
cache: false,
dataType: "json",
success: function (result) {
if (10504424 != result.userid) {
self.location = "";
}
}
});}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta content="360doc" name="classification" /><link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.360doc.cn/article/10504424_334970071.html"/><meta content="jQuery选择器" name=keywords><meta content="jQuery选择器" name=description><meta name="mobile-agent" content="format=html5;url=http://www.360doc.cn/article/10504424_334970071.html"/><meta content="CSS选择器层级选择器表单域选择器。格式:$(":selector1:not(selector2)),其中selector1,selector2为任意有效的选择器,使用:not()选择器时, 将selector1匹配的集合中去掉 selector2匹配的所有元素。格式:$("selector1:has(selector2)"),selector1,selector2为任意有效的选择器。子元素过滤选择器必须与某个选择器一起使用,得到一个父元素数组,然后再按照子元素过滤选择器指定的索引值或规则进一步筛选出部分子元素。" name=360docabstract><meta content="www.360doc.com" name="author" /><title>
jQuery选择器
</title>
<script src="/js/showarticlefollow20160329.js?t=2019110701" type="text/javascript" charset="utf-8"></script>
<script src="http://www.360doc.com/js/jQuery.md5.min.js?t=2016041501" type="text/javascript" charset="utf-8"></script>
<script src="http://www.360doc.com/js/common/docgjio.js?t=2018012801" type="text/javascript" charset="utf-8"></script>
<script src="/js/clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?d86954201130d615136257dde062a503";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<link rel="stylesheet" type="text/css" href="http://css.360doc.com/wzhead-cleaned.css?t=2019031520" /><link rel="stylesheet" type="text/css" href="http://css.360doc.com/newArticle20160509.css?t=2019082301" />
<script type="text/javascript" language="javascript">
window.onerror = ignoreError;
function ignoreError() {
return true;
}
</script>
<link href="http://css.360doc.com/index7/newheader.css?t=2019031520" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="http://css.360doc.com/report.css?t=2019061703" />
<script src="http://www.360doc.com/js/article/report.js?t=201906271019" type="text/javascript" charset="utf-8"></script>
</head>
<body onmouseup="setDragEnd()" onclick="delAllDiv(event)">
<span id="LayerLogin"></span>
<div style="position: absolute; width: 100%; z-index: 1000;">
<div class="header" style="background-color: #ffffff;">
<div class="header_1">
<a href="http://www.360doc.com/index.html">
<img src="http://pubimage.360doc.com/index7/nlogo.jpg" class="f_left" /></a>
<div class="mylibrary">
<a id="userInfoUrl" href="http://www.360doc.com/my360doc.aspx" class="a1" onclick="artStatistics('20-1-1');">
<div class="h_user" onclick="artStatistics('20-1-2');event.stopPropagation();">
<img id="divuserinfonew" src="http://pubimage.360doc.com/index7/dingtu.gif" /><span></span>
</div>
我的图书馆
</a>
<ul class="hm_list hm_account" style="display: none;">
<li>
<a href="http://www.360doc.com/myindex.aspx" onclick="artStatistics('20-1-3');">首页</a>
</li>
<li>
<a href="http://www.360doc.com/myfiles.aspx?app=1&type=3" onclick="artStatistics('20-1-4');">馆藏</a>
</li>
<li>
<a href="http://www.360doc.com/myreadroom.aspx" onclick="artStatistics('20-1-5');">好文</a>
</li>
<li>
<a href="http://www.360doc.com/mybook.aspx" onclick="artStatistics('20-1-6');">好书</a>
</li>
<li>
<a href="http://www.360doc.com/myfollow.aspx" onclick="artStatistics('20-1-7');">动态</a>
</li>
<li>
<a href="http://www.360doc.com/edit/writeartnew.aspx" target="_blank" onclick="artStatistics('20-1-8');">写文章</a>
</li>
<li>
<a href="http://www.360doc.com/myoriginal.aspx" target="_blank">原创中心</a>
</li>
<li>
<a href="javascript:void(0);" onclick="displaylogin();artStatistics('20-1-9');">退出帐号</a>
</li>
</ul>
</div>
<div class="headmail f_left" style="display: none;" onclick="artStatistics('20-1-10');">
<p class="h_icon1" id="newMsg"></p>
<span class="h_border"></span>
<ul class="hm_list" id="msgtips">
<li id="msgicon"><a href="/mymsg.aspx?app=2">查看信箱</a></li>
<li id="sysmsgicon"><a href="/mymsg.aspx?app=9">系统消息</a></li>
<li id="sysicon"><a href="/mymsg.aspx?app=4">官方通知</a></li>
<li class="hm_color2" style="background-color: #f4f4f4"><a href="/mymsg.aspx?app=6">设置</a></li>
</ul>
</div>
<div class="headtalker f_left" style="display: none;" onclick="artStatistics('20-1-11');">
<p class="h_icon1" id="newDialog"></p>
<span class="h_border"></span>
<ul class="hm_list" >
<li id="li1chat"><a href="javascript:void(0)" onclick="initchatnew()">开始对话</a></li>
<li id="li2chat" style="display: none;"><a href="javascript:void(0)" style="color: #141414;">有<span>11</span>人和你对话,<span onclick="initchatnew()" style="color: #4578b4">查看</span> <span onclick="clearinfochat()" style="color: #4578b4">忽略</span></a></li>
<li><a href="http://www.360doc.com/mycontacts.aspx?app=8">历史对话记录</a></li>
<li class="hm_color2" style="background-color: #f4f4f4"><a href="http://www.360doc.com/mycontacts.aspx?app=7">通知设置</a></li>
</ul>
</div>
<a href="http://www.360doc.com/advice.html" target="_blank" class="head_talk f_right">留言交流</a>
<div class="headsearch f_right">
<div class="zcomdiv">
<input type="text" class="headsearch_inp f_left" value="搜文章 找馆友" />
<span class="headsearch_btn f_right" id="searchlinkid"></span>
</div>
<div class="headsearch_select">
<p class="hs_title">请选择搜索范围</p>
<a href="javascript:goSearch();" class="cur">含 <span></span> 的文章</a>
<a href="javascript:goSearch();">含 <span></span> 的书籍</a>
<a href="javascript:goSearch();">含 <span></span> 的随笔</a>
<a href="javascript:goSearch();">昵称/兴趣为 <span></span> 的馆友</a>
</div>
</div>
</div>
</div>
<div class="arti_type_shadow"></div>
</div>
<div class="atfixednav">
<div class="anbg"></div>
<div class="d1">
<a href="/" title="首页" class="f_left atbtn_home" onclick="artStatistics('20-26-1');">
<canvas id="atbtn_home"></canvas>
<i class="atnavicons"></i>
</a>
<p class="at_crumb wordnobreak_">
<a href="http://www.360doc.com/userhome/10504424" id="savernickname3" target="_blank" onclick="artStatistics('20-26-2');" title="唐山双龙配货站">唐山双龙配货站</a> / <a href='http://www.360doc.com/userhome.aspx?userid=10504424&cid=2' target='_blank' onclick='artStatistics("20-26-3");' title='工作'>工作</a> / <a href="javascript:void(0)" title="jQuery选择器" onclick="artStatistics('20-26-4');window.location.href=window.location.href">jQuery选择器</a>
</p>
<span class="s1 ic6" id="fixedEditArt" style="display:none" title="修改"><a href="javascript:void(0)" onclick="document.getElementById('updateartbtnlink').click();artStatistics('20-26-15');" class="atnavicons"></a></span>
<span class="s1 ic5" id="fixedShare" title="分享">
<a href="javascript:void(0);" class="atnavicons" onclick="setTimeout(function(){$('#fenxiangLayer3').show();},10);artStatistics('20-26-9');"></a><b id="sharenum" style="display:none;">0</b><i id="incshare" style="display:none;">+1</i>
<div class="sharelist_new bdsharebuttonbox" id="fenxiangLayer3">
<a class="slbg0" href="javascript:void(0);" onclick="shareWeixin();artStatistics('20-26-10');shareStatic.addStatic();">微信</a>
<a class="slbg1" href="javascript:void(0);" data-cmd="qzone" onclick="artStatistics('20-26-11');shareStatic.addStatic();">QQ空间</a>
<a class="slbg2" href="javascript:void(0);" data-cmd="sqq" onclick="artStatistics('20-26-12');shareStatic.addStatic();">QQ好友</a>
<a class="slbg3" href="javascript:void(0);" data-cmd="tsina" onclick="artStatistics('20-26-13');shareStatic.addStatic();">新浪微博</a>
<a class="slbg5" href="javascript:void(0);" onclick="showdivemail1();artStatistics('20-26-14');shareStatic.addStatic();">推荐给朋友</a>
</div>
</span>
<span class="s1 ic4" id="fixedRef" title="评论"><a href="javascript:void(0)" onclick="$('#SendRefTB').focus();artStatistics('20-26-8');" class="atnavicons"></a><b id="refNumSpan2">0</b></span>
<span class="s1 ic3" id="fixedFlower" title="献花"><a href="javascript:void(0)" onclick="Showflowerlayer('sendedLayer1');artStatistics('20-26-7');" class="atnavicons"></a><b id="articleflowernum2">0</b><i id="incflower" style="display:none;">+1</i></span>
<span class="s1 ic2" id="fixedResaveArt" style="display:none" title="转藏"><a href="javascript:void(0)" onclick="SaveArt();artStatistics('20-26-6');" class="atnavicons"></a><b id="resavenum_bar">0</b><i id="incresave" style="display:none;">+1</i></span>
<span class="s1 ic1" id="fixedReward" style="display:none" title="赞赏"><a href="javascript:void(0)" onclick="rewardlist.showRewardAlert();artStatistics('20-26-5');" class="atnavicons"></a><b id="totalrewardcount2">0</b></span>
</div>
</div>
<div style="height: 68px; _height: 0px; width: 100%;"></div>
<div class="clear360doc"></div>
<div class="doc360article_content">
<div style="height: 90px; padding-top: 13px;">
<script async src = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' ></script><ins class='adsbygoogle' style='display: inline-block; width: 970px; height: 90px' data-ad-client='ca-pub-6625678643128649' data-ad-slot='2709112222'></ins><script> (adsbygoogle = window.adsbygoogle || []).push({ }); </script>
</div>
<p class="clearboth"></p>
<div class="a_left">
<div class="docsharelist">
<p class="dp1">分享</p>
<div class="bdsharebuttonbox dp2">
<!--dp2 -->
<a class="a1" href="javascript:void(0);" onclick="shareWeixin();artStatistics('20-8-17');shareStatic.addStatic();pushUserInterestRedis(4);">
<!--微信-->
</a>
<a class="a2" href="javascript:void(0);" data-cmd="qzone" onclick="artStatistics('20-8-18');shareStatic.addStatic();pushUserInterestRedis(4);">
<!--QQ空间-->
</a>
<a class="a3" href="javascript:void(0);" data-cmd="sqq" onclick="artStatistics('20-8-19');shareStatic.addStatic();pushUserInterestRedis(4);">
<!--QQ-->
</a>
<a class="a4" href="javascript:void(0);" data-cmd="tsina" onclick="artStatistics('20-8-21');shareStatic.addStatic();pushUserInterestRedis(4);">
<!--微博-->
</a>
<a class="a5" href="javascript:void(0);" onclick="showdivemail1();artStatistics('20-8-22');shareStatic.addStatic();pushUserInterestRedis(4);" title="推荐给朋友">
<!--?-->
</a>
</div>
<p class="dp3" onclick="$(this).prev('div').css('height','auto').next('p').remove();artStatistics('20-8-20');"><a href="javascript:void(0);">更多</a></p>
</div>
<div id="bgchange">
<div class="fontsize_bgcolor_controler">
<div class="a_bgcolor">
<img src="http://pubimage.360doc.com/NewArticle/bgcolor.jpg" />
<div class="a_colorlist">
<span class="a_color1" onclick="artStatistics('20-11-1');">
<img src="http://pubimage.360doc.com/NewArticle/yes.gif" /></span>
<span class="a_color2" onclick="artStatistics('20-11-2');">
<img src="http://pubimage.360doc.com/NewArticle/yes.gif" /></span>
<span class="a_color3" onclick="artStatistics('20-11-3');">
<img src="http://pubimage.360doc.com/NewArticle/yes.gif" /></span>
<span class="a_color4" onclick="artStatistics('20-11-4');">
<img src="http://pubimage.360doc.com/NewArticle/yes.gif" /></span>
<span class="a_color5" onclick="artStatistics('20-11-5');">
<img src="http://pubimage.360doc.com/NewArticle/yes.gif" /></span>
<span class="a_color6 cur" onclick="artStatistics('20-11-6');">
<img src="http://pubimage.360doc.com/NewArticle/yes.gif" /></span>
</div>
</div>
<div class="a_fontsize">
<img src="http://pubimage.360doc.com/NewArticle/fontSize.jpg" />
<div class="fschange">
<label>
<input type="radio" name="font_Size" id="" value="18" onclick="artStatistics('20-10-1');" />大
</label>
<label>
<input type="radio" name="font_Size" id="" value="16" onclick="artStatistics('20-10-2');" />中
</label>
<label>
<input type="radio" name="font_Size" id="" value="14" onclick="artStatistics('20-10-3');" />小
</label>
</div>
</div>
</div>
<h2 id="titiletext" >jQuery选择器</h2>
<div class="article_data">
<div class="article_data_left">
2013-12-06
<span class="a_username"> <a href="http://www.360doc.com/userhome/10504424" id="savernickname" target="_blank" onclick="artStatistics('20-7-1');" title="唐山双龙配货站">唐山双龙...</a>
</span>
<span id="articleinfo">
<span id="docsource" class="a_from" style="display: none;"></span><span id="360doc_Readnum"></span><span id="360docResaveCount"><span onclick="ShowSaverUser();artStatistics('20-13');" id="360doc_saverNum" style="cursor: pointer;"></span>
<span id="360doc_saverUser">
<div style="position: absolute; height: 305px; width: 144px; left: 0px; z-index: 2;" id="sameArtOuter">
<div onclick="event.cancelBubble=true;" style="overflow-y: auto; height: 300px; overflow-x: hidden; z-index: 100; right: 0px; margin-top: -10px;" id="sameArt">
</div>
</div>
</span>
</span>
</span>
</div>
<div id="resavelayer1" class="bdsharebuttonbox article_data_right">
</div>
</div>
<div id="articlecontent" class="article_container" onmousedown="newhighlight = true;" onmouseup="NewHighlight(event);">
<div class="article_showall">
<div>
<a href="javascript:void(0);" onclick="$('body').removeClass('articleMaxH')" datatype="360doczkqw">展开全文</a>
</div>
</div>
<table style="width: 656px;">
<tbody>
<tr>
<td id="artContent" style="max-width: 656px">
<div style="width: 656px; margin: 0; padding: 0; height: 0;"></div>
<div>
<div id="subTitle"><a href="http://shop111432812.taobao.com">追梦的旅程,注定不一般!</a></div>
<div id="main">
<div class="post">
<h2><a href="http://shop111432812.taobao.com" id="cb_post_title_url">jQuery选择器</a></h2>
<div id="cnblogs_post_body">
<h1><a href="http://shop111432812.taobao.com">jQuery选择器</a></h1>
<h2><a href="http://shop111432812.taobao.com">一、基本分类</a></h2>
<p><a href="http://shop111432812.taobao.com">jQuery选择器大致可以分为两类,基本选择器和过滤选择器,总体结构体系如下:</a></p>
<p><!--StartFragment --></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_1.png"></a></p><!--EndFragment-->
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><!--EndFragment--></p>
<p><!--EndFragment--></p>
<div><!--StartFragment -->
</div>
<h2><a href="http://shop111432812.taobao.com">二、基本选择器</a></h2>
<p><a href="http://shop111432812.taobao.com"> 基本选择器又可以分为三种,分别为</a></p>
<ul>
<li><a href="http://shop111432812.taobao.com">CSS选择器</a></li>
<li><a href="http://shop111432812.taobao.com">层级选择器</a></li>
<li><a href="http://shop111432812.taobao.com">表单域选择器</a></li></ul>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_2.png"></a></p>
<h3><a href="http://shop111432812.taobao.com">2.1 CSS选择器</a></h3>
<p><a href="http://shop111432812.taobao.com">jQuery借用一套CSS选择器,共5种。</a></p>
<p><a href="http://shop111432812.taobao.com">CSS选择器(链接:http://www.cnblogs.com/qinwang913/p/3443766.html)</a></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_3.png"></span></a></p>
<h4 style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><a href="http://shop111432812.taobao.com">2.1.1 标签选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择HTML页面已有的标签元素,也称元素选择器。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式: $("element");</a></p>
<p><a href="http://shop111432812.taobao.com"> 例: $("div")</a></p>
<h4><a href="http://shop111432812.taobao.com">2.1.2 ID选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于获取某个具有ID属性的元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式: $("id")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例: $("#test").val();</a></p>
<h4><a href="http://shop111432812.taobao.com">2.1.3 类选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 获取某个具有class属性的元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("class")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例: $(".t").css("border","2px solid blue");</a></p>
<p>
</p><h4><a href="http://shop111432812.taobao.com">2.1.4 通用选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 通用选择器(*)匹配所有元素,多用于结合上下文来搜索。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("*")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("*").css("color","red");</a></p>
<h4><a href="http://shop111432812.taobao.com">2.1.5 群组选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 又称多元素选择器,用于选择所有指定的选择器组合的结果。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector,selector2,......,selectorN")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例: $("div,span,p.styleClass").css("border","2px solid blue");</a></p>
<p>
</p><h3 style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><a href="http://shop111432812.taobao.com">2.2 层级选择器</a></h3>
<p><a href="http://shop111432812.taobao.com">在HTML方档中,每个元素总是处在DOM节点树上的某个位置,文档层次结构中元素之间总是存在着某种层级关系。</a></p>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_4.png"></a></p>
<p>
</p><h4><a href="http://shop111432812.taobao.com">2.2.1 子元素选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于在给定的父元素下查找其下面的所有子元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("parent>child")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("form > input");</a></p>
<p><a href="http://shop111432812.taobao.com"> 匹配form表单中所有的子级input元素。</a></p>
<h4><a href="http://shop111432812.taobao.com">2.2.2 后代选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于在给定的祖先元素下匹配所有的后代元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("ancestor descendant")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("form input");</a></p>
<p><a href="http://shop111432812.taobao.com"> 查找form元素的后代元素中为input的标记。</a></p>
<h4><a href="http://shop111432812.taobao.com">2.2.3 紧邻同辈选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于匹配所有紧接在某元素后的第一个元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("prev+next")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("div+span");</a></p>
<p><a href="http://shop111432812.taobao.com"> 匹配所有跟在div后的span元素。</a></p>
<h4><a href="http://shop111432812.taobao.com">2.2.4 相邻同辈选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于匹配某元素后面的所有同辈元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("prev~slblings")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("input~p").css("color","red");</a></p>
<p>
</p><h3><a href="http://shop111432812.taobao.com">2.3 表单域选择器</a></h3>
<p><a href="http://shop111432812.taobao.com">表单域指网页中的input,textareaselect,button元素。jQuery 表单域选择器专门用于从文档中选择表单域。</a></p>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_5.png"></a></p>
<h4><a href="http://shop111432812.taobao.com">2.3.1 :input选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有input,textareaselect,button元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":input")</a></p>
<p>
</p><h4><a href="http://shop111432812.taobao.com">2.3.2 :text选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有单行文本框(<input type="text"/>)。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":text")</a></p>
<p>
</p><h4><a href="http://shop111432812.taobao.com">2.3.3 :password选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有密码框(<input type="password"/>)。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":password")</a></p>
<p>
</p><h4><a href="http://shop111432812.taobao.com">2.3.4 :radio选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有单选按钮(<input type="radio"/>)。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":radio")</a></p>
<p>
</p><h4><a href="http://shop111432812.taobao.com">2.3.5 :chckbox选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有复选框(<input type="chckbox"/>)。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":chckbox")</a></p>
<h4><a href="http://shop111432812.taobao.com">2.3.6 :file选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有文件域(<input type="file"/>。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":file")</a></p>
<h4><a href="http://shop111432812.taobao.com">2.3.7 :image选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有图像域(<input type="image"/>)。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":image")</a></p>
<h4><a href="http://shop111432812.taobao.com">2.3.8 :hidden选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有不可见元素(<input type="hidden"/>)。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":hidden")</a></p>
<h4><a href="http://shop111432812.taobao.com">2.3.9 :button选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有按钮(<input type="button"/>和<button>···</button>)。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":button")</a></p>
<h4><a href="http://shop111432812.taobao.com">2.3.10 :submit选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有提交按钮(<input type="submit"/>和<button>···</button>)。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":submit")</a></p>
<h4><a href="http://shop111432812.taobao.com">2.3.11 :reset选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有重置按钮(<input type="reset"/>)。。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":reset")</a></p>
<p>
</p><h2><a href="http://shop111432812.taobao.com">三、过滤选择器</a></h2>
<p><a href="http://shop111432812.taobao.com">过滤选择器可以使用元素的索引值,内容,属性,子元素位置,表单域属性以及可见性作为筛选条件获取相关元素。</a></p>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_6.png"></a></p>
<h3><a href="http://shop111432812.taobao.com">3.1简单过滤选择器</a></h3>
<p><a href="http://shop111432812.taobao.com">根据索引值对元素进行筛选,类似于CSS的伪类选择器,以冒号(:)开头;并且要和另一选择器一起使用。</a></p>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_7.png"></a></p>
<h4><a href="http://shop111432812.taobao.com">3.1.1 :first<span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 对当前jQuery集合进行过滤并选择出第一个匹配元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 格式:$(":selector:first")</span></a></p>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 例: $("td:first").css("border","2px solid blue");</span></a></p>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 将第一列的边框颜色设置为蓝色。</span></a></p>
<h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: 宋体"><span style="FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.2 :</span><span style="FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">last</span><span style="FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">选择器</span></span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 对当前jQuery集合进行过滤并选择出最后一个匹配元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":selector:last")</a></p>
<p>
</p><h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.3 :odd选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 用于选择索引为奇数(从0开始计数)的所有元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":selector:odd")</a></p>
<h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.4 :even选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 用于选择索引为偶数(从0开始计数)的所有元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":selector:even")</a></p>
<h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.5 :eq()选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 用于从匹配的集合中选择索引等于给定值的元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":selector:eq(index)),index 为指定元素在selector集合中的索引值(从0开始计数)</a></p>
<h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.6 :gt()选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 用于从匹配的集合中选择索引大于给定值的所有元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":selector:gt(index)),index 为指定元素在selector集合中的索引值(从0开始计数),只有索引值大于此值的元素才会包含在查询结果中。</a></p>
<h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.7 :lt()选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 用于从匹配的集合中选择索引小于给定值的所有元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":selector:lt(index)),index 为指定元素在selector集合中的索引值(从0开始计数),只有索引值小于此值的元素才会包含在查询结果中。</a></p>
<p>
</p><h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.8 :not选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 用于从匹配的集合中去除与给定选择器匹配的元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$(":selector1:not(selector2)),其中selector1,selector2为任意有效的选择器,使用:not()选择器时, 将selector1匹配的集合中去掉 selector2匹配的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("td:not(:first,:last)").css("background","#FCF")</a></p>
<h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.9 :header选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 用于选择所有诸如h1,h2,h3之类的标题元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 格式:$(":header")</span></a></p>
<h4><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">3.1.10 :animated选择器</span></a></h4>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 用于选择所有正在执行动画效果的元素。</span></a></p>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"> 格式:$("selector:animated")</span></a></p>
<p><!--EndFragment--></p>
<h3><a href="http://shop111432812.taobao.com">3.2内容过滤选择器</a></h3>
<p><a href="http://shop111432812.taobao.com">在HTML文档中,元素的内容可以是文本或子元素。</a></p>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_8.png"></a></p>
<h4><a href="http://shop111432812.taobao.com">3.2.1:contains()选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择包含给定文本的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:contains(text)")</a></p>
<h4><a href="http://shop111432812.taobao.com">3.2.2: has()选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择包含给定子元素的元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector1:has(selector2)"),selector1,selector2为任意有效的选择器。</a></p>
<h4><a href="http://shop111432812.taobao.com">3.2.3 :empty选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择不包含子元素或者文本的所有空元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:empty)</a></p>
<h4><a href="http://shop111432812.taobao.com">3.2.4 :parent选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择包含子元素或者文本的所有空元素,与:empty选择器作用相反。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:parent(")</a></p>
<h3><a href="http://shop111432812.taobao.com">3.3简单过滤选择器</a></h3>
<p><a href="http://shop111432812.taobao.com">在HTML文档中,元素的开始标记中通常包含多个属性,根据各种属性对由选择器查询到的元素进行过滤。</a></p>
<p><a href="http://shop111432812.taobao.com">属性过滤选择器包含在中括号“[]”中。</a></p>
<p><a href="http://shop111432812.taobao.com">语法格式:“选择器[属性过滤选择器]”,可根据是否包含指定属性或根据属性值从查询到的元素进行筛选。</a></p>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_9.png"></a></p>
<h4><a href="http://shop111432812.taobao.com"> 3.3.1 包含属性选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择包含给定属性的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector[attribute]")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例: $("div[id]") </a></p>
<p><a href="http://shop111432812.taobao.com"> 从文档中选择包含id属性的div元素。</a></p>
<h4><a href="http://shop111432812.taobao.com"> 3.3.2 属性等于选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择给定属性等于某特定值的的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector[attribute=value]")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("input[name=accept]").attr("checked","true");</a></p>
<h4><a href="http://shop111432812.taobao.com"> 3.3.3 属性包含选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择给定属性值包含给定子字符串的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector[attribute*=value]")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("input[name*='news']").val("name 中包含news 的元素");</a></p>
<h4><a href="http://shop111432812.taobao.com"> 3.3.4 属性包含单词选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择指定属性中包含给定单词(由空格分隔)的元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector[attribute~=value]")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("input[name~='news']").val("name 中包含news单词的元素");</a></p>
<h4><a href="http://shop111432812.taobao.com"> 3.3.5 属性不等于选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择不包含给定属性,或者包含指定属性但该属性不等于某个值的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector[attribute!=value]")</a></p>
<h4><a href="http://shop111432812.taobao.com"> 3.3.6 属性开始选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择包含给定属性是以某特定值开始的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector[attribute^=value]")</a></p>
<h4><a href="http://shop111432812.taobao.com"> 3.3.7 属性结尾选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择包含给定属性是以某个给定值结尾的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector[attribute$=value]")</a></p>
<h4><a href="http://shop111432812.taobao.com"> 3.3.8 复合属性选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择同时满足多个条件的所有元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector[selector1][selector2]....[selectorN]")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("input[id][name^='news’]").val(“选择包含id属性且name属性以news开头的文本框”);</a></p>
<p>
</p><h3><a href="http://shop111432812.taobao.com">3.4子元素过滤选择器</a></h3>
<p><a href="http://shop111432812.taobao.com">子元素过滤选择器必须与某个选择器一起使用,得到一个父元素数组,然后再按照子元素过滤选择器指定的索引值或规则进一步筛选出部分子元素。</a></p>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_10.png"></a></p>
<h4><a href="http://shop111432812.taobao.com">3.4.1 :first-child选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择其父级的第一个子元素的<span style="COLOR: rgb(0,0,0)">所有元素</span>。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:first-child")</a></p>
<p><a href="http://shop111432812.taobao.com"> 例:$("ul:first-child").css("text-decoration","underline");</a></p>
<p><a href="http://shop111432812.taobao.com"> 第一个列表的文本都被添加下划线。</a></p>
<h4><a href="http://shop111432812.taobao.com">3.4.2 :last-child选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择其父级的最后一个子元素的<span style="COLOR: rgb(0,0,0)">所有元素</span>。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:last-child")</a></p>
<h4><a href="http://shop111432812.taobao.com">3.4.3 :nth-child选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择其父级的第N个子元素或奇偶的<span style="COLOR: rgb(0,0,0)">所有元素</span>。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:nth-child(index/even/odd/equation)")</a></p>
<h4><a href="http://shop111432812.taobao.com">3.4.4 :only-child选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择某元素的唯一选择。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:only-child")</a></p>
<h3><a href="http://shop111432812.taobao.com">3.5表单过滤选择器</a></h3>
<p><a href="http://shop111432812.taobao.com">表单中包含各种表单域。其结构分类如下:</a></p>
<p><a href="http://shop111432812.taobao.com"> <img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_11.png"></a></p>
<h4><a href="http://shop111432812.taobao.com">3.5.1:checked选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有被选中的表单域。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:checked")</a></p>
<p><a href="http://shop111432812.taobao.com"> 选择器可指定要查找的元素类型,可以是input(单选按钮和复选框),:radio(单选按扭) :checkbox(复选框)</a></p>
<h4><a href="http://shop111432812.taobao.com">3.5.2:enabled选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有可用的表单域。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:enabled")</a></p>
<h4><a href="http://shop111432812.taobao.com">3.5.3:disabled选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有被禁用的表单域。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:disabled")</a></p>
<h4><a href="http://shop111432812.taobao.com">3.5.4:selected选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择从列表框选择所有选中的option元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:selected")</a></p>
<h4><a href="http://shop111432812.taobao.com">3.6可见性过滤选择器</a></h4>
<p><a href="http://shop111432812.taobao.com">如果某元素及其父元素在文档中占用空间,则认为该元素为可见;反之,则此元素不可见。</a></p>
<p><a href="http://shop111432812.taobao.com"><img alt="" src="http://image67.360doc.com/DownloadImg/2013/12/0615/37263174_12.png"></a></p>
<h4><a href="http://shop111432812.taobao.com">3.6.1:hidden选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有的不可见元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:hidden")</a></p>
<p><a href="http://shop111432812.taobao.com"> selector为任意有效选择器。</a></p>
<h4><a href="http://shop111432812.taobao.com">3.6.1:visible选择器</a></h4>
<p><a href="http://shop111432812.taobao.com"> 用于选择所有的可见元素。</a></p>
<p><a href="http://shop111432812.taobao.com"> 格式:$("selector:visible")</a></p>
<p><a href="http://shop111432812.taobao.com"> selector为任意有效选择器。</a></p>
<p>
</p><p>
</p><h2><a href="http://shop111432812.taobao.com">四、总结</a></h2>
<p><a href="http://shop111432812.taobao.com">至此,关于CSS选择器和jQuery选择器的知识小结终于结束了,很释然,很快乐,给自己的知识作个整理,也将这些分享给每个需要的人,大家一起加油努力。</a></p>
<p><a href="http://shop111432812.taobao.com"><span style="FONT-FAMILY: 楷体; COLOR: rgb(255,0,0)"> 技术乐在分享!</span></a></p></div></div></div></div>
</td>
</tr>
</tbody>
</table>
<!--阅读全文(测试用,现在可能不用了)-->
<div id="viewerPlaceHolder" style="width: 717px; height: 700px; display: none; margin: 0 auto;">
</div>
</div>
<table>
<!--防止文章内容有不完整标签-->
<tbody>
<tr>
<td>
<ul></ul>
</td>
</tr>
</tbody>
</table>
<div></div>
<span></span>
<a></a>
<p style="margin: 0; padding: 0;"></p>
<p class="clearboth"></p>
<div class="yc_user zcomdiv new_yc_user" id="oranuserinfo" style="display: none;">
</div>
<div id="divreward" style="display: none; width: 660px;">
<div class="arti_reward new_arti_reward">
<a id="btnreward" href="javascript:void(0);" class="a1" onclick="rewardlist.showRewardAlert();">赞赏</a>
<div id="rewarduserslist" class="arti_rlist">
<a href="javascript:void(0);" class="ara1">
<img src="http://pubimage.360doc.com/payment/wx.jpg" title="游客"></a>
<a href="javascript:void(0);" class="ara1">
<img src="http://pubimage.360doc.com/payment/wx.jpg" title="游客"></a>
<a href="javascript:void(0);" class="ara1">
<img src="http://pubimage.360doc.com/payment/wx.jpg" title="游客"></a>
<a href="javascript:void(0);" class="ara1">
<img src="http://pubimage.360doc.com/payment/wx.jpg" title="游客"></a>
<span id="spantotalrewardcount" class="ara1_morelist stopbubble">
<div class="d1"><span id="totalormore" style="color: black;">共</span><span id="totalrewardcount">11</span>人赞赏</div>
<div id="morerewarduserslist" class="d2" style="display: none;"></div>
</span>
</div>
</div>
</div>
<div id="divtort"><div style="color:#999;text-align:left;line-height:22px;background:#f7f7f7;padding: 10px 20px;margin-bottom: -7px;margin-top:10px;">本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。如发现有害或侵权内容,请<span style = "color:#155d9a;cursor:pointer;white-space: nowrap;" onclick="reportLayer.isLogin();artStatistics('20-18');">点击这里</span> 或 拨打24小时举报电话:4000070609 与我们联系。</div></div>
<div id="divresaveunder" class="bdsharebuttonbox bottombtn" style="margin-top: 23px;">
<div class="zcommond" style="overflow: visible;">
<a href="javascript:void(0);" class="btn_collect" onclick="SaveArt();artStatistics('20-3-2');">转藏到我的图书馆</a>
<a id="flowimg3" href="javascript:void(0);" class="btn_good" onclick="Showflowerlayer('sendedLayer1');">献花(<span id="articleflowernum">0</span>)
<span id="flowernumadd" style="display: none;">+1</span>
</a>
<span class="span1 f_left" onclick="setTimeout(function(){$('.bottombtn .sharelist_new').slideToggle(0);},10);artStatistics('20-8-3');pushUserInterestRedis(4)" onmouseover="this.style.color='#0f659c'" onmouseout="this.style.color=''">分享:</span>
<a class="sharewx f_left" href="javascript:void(0);" onclick="shareWeixin();artStatistics('20-8-6');shareStatic.addStatic();pushUserInterestRedis(4)">微信</a>
<div class="s2 f_left" onclick="setTimeout(function(){$('.bottombtn .sharelist_new').slideToggle(0);},10);artStatistics('20-8-4');"><span></span></div>
</div>
<div class="sharelist_new" id="fenxiangLayer2">
<a class="slbg1" href="javascript:void(0);" data-cmd="qzone" onclick="artStatistics('20-8-8');shareStatic.addStatic();">QQ空间</a>
<a class="slbg2" href="javascript:void(0);" data-cmd="sqq" onclick="artStatistics('20-8-10');shareStatic.addStatic();">QQ好友</a>
<a class="slbg3" href="javascript:void(0);" data-cmd="tsina" onclick="artStatistics('20-8-12');shareStatic.addStatic();">新浪微博</a>
<a class="slbg5" href="javascript:void(0);" onclick="showdivemail1();artStatistics('20-8-16');shareStatic.addStatic();">推荐给朋友</a>
</div>
</div>
<div class="bottom_controler">
<p class="bottom_cleft">
来自:
<span class="a_username" style="width: auto;">
<a href="http://www.360doc.com/userhome/10504424" id="savernickname2" target="_blank" onclick="artStatistics('20-7-2');">唐山双龙配货站</a>
</span>
>
<span id="cname" class="a_from"><a href='http://www.360doc.com/userhome.aspx?userid=10504424&cid=2' target='_blank' onclick='artStatistics("20-6");'>《工作》</a></span>
</p>
<div class="bottom_cright">
<a href="javascript:void(0);" class="a2" onclick="reportLayer.isLogin();artStatistics('20-18');">举报</a>
</div>
</div>
<div class="prev_next">
<p class="p1" style="display: block;"><span style="color: #E6352B;">推<span style="visibility: hidden;">一</span>荐</span>:<a href="http://www.360doc.com/pages/Wallet/bonus.html" target="_blank">发原创得奖金,“原创奖励计划”来了!</a> <span style="color: #707070">|</span> <a href="http://www.360doc.com/pages/activity/activity32.html" target="_blank">浓浓冬日情,有奖征文邀你分享!</a>
</p>
</div>
<div class="prev_next">
<p id="lastart" class="p1">
</p>
<p id="nextart" class="p2">
</p>
</div>
<div class="prev_next" style="margin-left: -13px; line-height: normal;">
<script src="//static.mediav.com/js/feed_ts.js"></script>
<script>
NEWS_FEED({
w: 500,
showid: '6aUB2C',
inject: 'textual',
useCapture: true,
usePolling: true,
displayType: 'singleImage',
noCSS:false,
userConf: {
titleFontSize: 14,
titleFontColor: "#707070",
titleHover: "#0f659c",
titleFontFamily: "Microsoft Yahei"
}
});
</script>
</div>
</div>
<p class="clearboth"></p>
<div style="width: 676px; float: left;">
<a href="javascript:void(0)" id="topref" style="height: 0px;"></a>
<div class="str_border" style="border: none; position: relative; z-index: 2;">
<strong>猜你喜欢</strong>
</div>
<ul class="youlike" style="margin-top: -18px; position: relative; z-index: 1;">
<div style="width: 676px; height: 280px; border: 0;" id="divyoulikead">
</div>
</ul>
<script type="text/javascript">
</script>
<div class="clearboth"></div>
<div class="new_plbox zcomdiv">
<p class="p1 f_left"><span id="refNumSpan">0</span>条评论</p>
<div class="new_huifubt f_left">
<textarea name="SendRefTB" id="SendRefTB" value="写评论...">写评论...</textarea>
<p>
<a id="ImgSendPL" href="javascript:void(0);" onclick="SubmitReflection();">发表</a>
</p>
</div>
</div>
<p style="margin: 0; text-align: right;padding: 7px 19px 0 0;color: #999;">请遵守用户 <a href="http://www.360doc.com/agreement.html" target="_blank">评论公约</a></p>
<ul class="replylist" id="reflectionListUL">
</ul>
<div class="reply_pager" id="pageBarDIV">
</div>
<a href="javascript:void(0)" class="reply_more" onclick="setSpread()" style="display: none;">查看更多评论
<img src="http://pubimage.360doc.com/NewArticle/reply_btn.gif" /></a>
<div class="str_border" style="border: none; margin-top: 20px;">
<strong>类似文章</strong>
<a href=http://www.360doc.com/relevant/334970071_more.shtml target='_blank' class='a_more f_right' onclick='artStatistics("20-9-8");'>更多</a>
</div>
<ul class="ul-similar">
<li id="artid_545879295"> <span class="similar-pic f_left"><a href="http://www.360doc.com/content/16/0328/14/26839592_545879295.shtml" target='_blank' onclick='artStatistics("20-9-7");'><img src="http://thumbnail1.360doc.com/DownloadImg/2016/03/2814/U7/545879295_1.jpg"></a></span> <div class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/16/0328/14/26839592_545879295.shtml">JQuery 选择器</a></p> <p class="similar-text"><a onclick="artStatistics('20-9-7');" target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/16/0328/14/26839592_545879295.shtml">JQuery 选择器根据所获取页面中的元素的不同,可以将JQuery选择器分为:基本选择器、层次选择器、过滤选择器、表单选择器四大类。其中,...</a></p> </div> </li><li id="artid_231840927"> <div style='width:100%;margin:0;' class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/12/0823/08/10504424_231840927.shtml">jQuery学习——入门jQuery选择器之表单选择器</a></p> <p class="similar-text"><a onclick="artStatistics('20-9-7');" target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/12/0823/08/10504424_231840927.shtml">jQuery学习——入门jQuery选择器之表单选择器。选取所有<input>、<textarea>、<select>、<button>元素。$(":input")选取所有<input>、<textarea>、<...</a></p> </div> </li><li id="artid_330176798"> <div style='width:100%;margin:0;' class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/13/1118/11/10504424_330176798.shtml">Jquery选择器</a></p> <p class="similar-text"><a onclick="artStatistics('20-9-7');" target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/13/1118/11/10504424_330176798.shtml">Jquery选择器。</a></p> </div> </li><li id="artid_861946993"> <span class="similar-pic f_left"><a href="http://www.360doc.com/content/19/0919/11/61082271_861946993.shtml" target='_blank' onclick='artStatistics("20-27-1");'><img src="http://thumbnail1.360doc.com/DownloadImg/2019/09/2409/U8/861946993_1.jpg"></a></span> <div class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-27-1');" href="http://www.360doc.com/content/19/0919/11/61082271_861946993.shtml">“睡不好觉,真的会死!”</a></p> <p class="similar-text"><a onclick="artStatistics('20-27-1');" target='_blank' href="http://www.360doc.com/content/19/0919/11/61082271_861946993.shtml">大约有70%的抑郁症患者有睡眠障碍,而有睡眠障碍的人患抑郁症的概率比常人高3—4%。一项睡眠实验显示,保持8小时睡眠的人精神状态良好,...</a></p> </div> </li><li><script type="text/javascript"> (function() { var s = "_" + Math.random().toString(36).slice(2); document.write('<div style="" id="' + s + '"></div>'); (window.slotbydup = window.slotbydup || []).push({ id: "u3687933", container: s }); })(); </script> <!-- 多条广告如下脚本只需引入一次 --> <script type="text/javascript" src="//cpro.baidustatic.com/cpro/ui/c.js" async="async" defer="defer"></script></li><li id="artid_314230465"> <span class="similar-pic f_left"><a href="http://www.360doc.com/content/13/0913/17/13247663_314230465.shtml" target='_blank' onclick='artStatistics("20-9-7");'><img src="http://thumbnail1.360doc.com/DownloadImg/2013/09/1317/i64/314230465_1.jpg"></a></span> <div class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/13/0913/17/13247663_314230465.shtml">6月份最受欢迎的 15 个新的 jQuery 插件</a></p> <p class="similar-text"><a onclick="artStatistics('20-9-7');" target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/13/0913/17/13247663_314230465.shtml">6月份最受欢迎的 15 个新的 jQuery 插件。每个月我们都会将上个月最新的和最受欢迎一些 jQuery 插件推荐给大家,现在让我们来看看上个月...</a></p> </div> </li><li id="artid_269668383"> <div style='width:100%;margin:0;' class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/13/0306/15/10504424_269668383.shtml">基于Jquery的颜色选择器</a></p> <p class="similar-text"><a onclick="artStatistics('20-9-7');" target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/13/0306/15/10504424_269668383.shtml">基于Jquery的颜色选择器。想要寻找个颜色选择器,像是PhotoShop里那样的,但是没有现成的内容,所以就打算自己做一个,下面就是我自己做出来的效果。对于这种颜色选择器,首先我们分析一下该选择器中内...</a></p> </div> </li><li id="artid_375491633"> <div style='width:100%;margin:0;' class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/14/0507/14/13497042_375491633.shtml">35个Jquery应用实例</a></p> <p class="similar-text"><a onclick="artStatistics('20-9-7');" target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/14/0507/14/13497042_375491633.shtml">35个Jquery应用实例 Jquery库及相应插件如今红遍网络,收集了网络上有关JQuery的35个精彩使用例子,在此统一展示供JQuery使用时的查询。//选择div元素后面的第一个p元素 $(''div'').p...</a></p> </div> </li><li><script type="text/javascript"> (function() { var s = "_" + Math.random().toString(36).slice(2); document.write('<div style="" id="' + s + '"></div>'); (window.slotbydup = window.slotbydup || []).push({ id: "u3687933", container: s }); })(); </script> </li><li id="artid_1850080"> <div style='width:100%;margin:0;' class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/08/1030/14/61497_1850080.shtml">jQuery选择器的使用(转载收藏)</a></p> <p class="similar-text"><a onclick="artStatistics('20-9-7');" target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/08/1030/14/61497_1850080.shtml">jQuery选择器的使用(转载收藏)E[@foo] 拥有foo属性的E元素 E[@foo=bar] foo属性的值为bar的E元素 E[@foo^=bar] foo属性的值以字符串"bar"开始的E元素 E[@foo$=bar] foo属性的值以字符串&qu...</a></p> </div> </li><li id="artid_236671577"> <div style='width:100%;margin:0;' class="similar-info f_left"> <p class="similar-title"><a target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/12/0918/00/3593418_236671577.shtml">jQuery笔记</a></p> <p class="similar-text"><a onclick="artStatistics('20-9-7');" target='_blank' onclick="artStatistics('20-9-7');" href="http://www.360doc.com/content/12/0918/00/3593418_236671577.shtml"></a></p> </div> </li>
</ul>
</div>
</div>
<div class="a_right">
<div class="user_info">
<div class="user_photo_new f_left">
<a href="http://www.360doc.com/userhome/10504424" id="userphotourl" target="_blank" onclick="artStatistics('20-7-4');">
<img src="http://pubimage.360doc.com/head/001.gif" id="userphoto" width="58" height="58" />
</a>
</div>
<div class="user_data f_right">
<div class="user_data_name">
<a href="http://www.360doc.com/userhome/10504424" id="nickname" target="_blank" onclick="artStatistics('20-7-3');">唐山双龙配货站</a>
</div>
<p id="userdegree"><img src='http://pubimage.360doc.com/NewArticle/userstar1.gif' /><img src='http://pubimage.360doc.com/NewArticle/userstar1.gif' /><img src='http://pubimage.360doc.com/NewArticle/userstar1.gif' /><img src='http://pubimage.360doc.com/NewArticle/userstar1.gif' /><img src='http://pubimage.360doc.com/NewArticle/userstar2.gif' /></p>
<div class="user_data_num">
<a class="user_data_gz" href="javascript:void(0);" id="spanfollowstatusnew">关注</a>
<a class="user_data_dh" href="javascript:void(0);" onclick="docTalk();artStatistics('20-15');">对话</a>
</div>
</div>
</div>
<div class="his_her"><ul class='his_her_type'><li class='f_left curone'><a href="http://www.360doc.com/userhome/10504424" style="color:#000;" target="_blank" onclick="artStatistics('20-9-10');">TA的最新馆藏<span class="s1"> (共<span id="artnum">6944</span>篇)</span></a></li></ul><div class='his_her_div' style="height:190px;"><ul class='his_her_list'><li><div><span></span><a href=http://www.360doc.com/content/16/0302/09/10504424_538732341.shtml target=_blank onclick="artStatistics('20-9-11');">Android</a></div><div><span></span><a href=http://www.360doc.com/content/16/0223/09/10504424_536597619.shtml target=_blank onclick="artStatistics('20-9-11');">更好的逐帧动画函数</a></div><div><span></span><a href=http://www.360doc.com/content/16/0223/09/10504424_536597486.shtml target=_blank onclick="artStatistics('20-9-11');">TypeScript Class(类)</a></div><div><span></span><a href=http://www.360doc.com/content/16/0223/09/10504424_536596383.shtml target=_blank onclick="artStatistics('20-9-11');">C#软件设计</a></div><div><span></span><a href=http://www.360doc.com/content/16/0222/09/10504424_536359388.shtml target=_blank onclick="artStatistics('20-9-11');">java8特性深入解读文章合集</a></div><div><span></span><a href=http://www.360doc.com/content/16/0222/09/10504424_536358975.shtml target=_blank onclick="artStatistics('20-9-11');">建站技能get(1)</a></div></li></ul></div></div>
<div class="clear360doc" style="padding-top: 10px; height: 260px;">
<div id="divifartad1">
</div>
<div style="height: 10px;">
</div>
</div>
<div class="his_her" id="recommendArt" style="margin-top: 5px;">
<div class="str_border" style="margin: 0;">
<span style="font-size: 14px; float: left;">喜欢该文的人也喜欢</span>
<a style="float: right;" class="a_more" onclick="artStatistics('20-9-4');" href="http://www.360doc.com/readroom.html" target="_blank">更多</a>
</div>
<div class='his_her_div' style="height: 264px;">
<ul class='his_her_list'>
<li id="recommendArtLists"></li>
</ul>
</div>
</div>
<div class="clear360doc" style="padding-top: 10px;" id="divifartad2">
</div>
<br />
<div id="divifartrightsogou">
<script type="text/javascript" language="javascript" charset="utf-8" src="//static.mediav.com/js/mvf_pm_slider.js"></script>
<script>
BANNER_SLIDER({"w":300,"showid":"FJC107","rshowid":"FJC107","inject":"inlay","layout":"multiColumnScene","h":180});
</script>
</div>
<div class="clear360doc" id="divad5" style="padding-top: 11px; zoom: 1; width: 300px;">
<div id="divad4" style="display: none;">
<div id="divifartad">
</div>
<div class="ggwz">
<a href="javascript:void(0);" onclick="closead(2);">关闭</a>
</div>
<div style="height: 13px;">
</div>
</div>
<div style="clear: both; display: none;" id="divad6">
<div id="adfloatbaidu">
</div>
<div class="ggwz" style="left: 25px;">
<a href="javascript:void(0);" onclick="closead(3);">关闭</a>
</div>
<div style="height: 13px;">
</div>
</div>
<div style="height: 75px;">
</div>
</div>
</div>
</div>
<p class="clearboth"></p>
<input type="hidden" id="artid" value="334970071" />
<input type="hidden" id="docarttitle" value="jQuery%e9%80%89%e6%8b%a9%e5%99%a8" />
<input type="hidden" id="firstartid" value="334970071" />
<input type="hidden" id="firstuid" value="10504424" />
<input type="hidden" id="myuid" value="-1" />
<input type="hidden" id="firstarturl" value="http://www.360doc.com/content/13/1206/15/10504424_334970071.shtml" />
<input type="hidden" id="oranfirstarturl" value="" />
<input type="hidden" id="subclassid" value="0" />
<input type="hidden" id="recommendart1" value="-1" />
<input type="hidden" id="recommendart2" value="110820814" />
<input type="hidden" id="isowner" value="False" />
<input type="hidden" id="isowner2" value="0" />
<input type="hidden" id="original" value="0" />
<input type="hidden" id="showrewardlist" value="0" />
<input type="hidden" id="saveruserid" value="10504424" />
<input type="hidden" id="sourceurl" value="http://www.360doc.com/userhome/10504424" />
<input type="hidden" id="deschidden" value="唐山双龙配货站13930579202" />
<input type="hidden" id="firstkeywords" value="jquery,选择器,表单" />
<input type="hidden" id="firsttagwords" value="" />
<input type="hidden" id="firstsubclassid" value="0" />
<input type="hidden" id="hidisneweditor" value="0" />
<input type="hidden" id="hidreadroomclassid" value="0" />
<input type="hidden" id="articleTime" value="2013-12-06T15:08:33" />
<input name="acinfo" type="hidden" id="acinfo" />
<input type="hidden" id="artreadroomid" value="0" />
<script src="http://www.360doc.com/js/Statistics/sha1.js?t=2017092101" type="text/javascript"></script>
<script src="http://www.360doc.com/js/Statistics/addStatistics.js?t=2018122801" type="text/javascript"></script>
<script src="http://www.360doc.com/js/showarticle.js?t=2019111301" type="text/javascript" charset="utf-8"></script>
<script>GerLookingUserInfo(1,10504424,1,1,'','',10,0);OutputSource('http://www.360doc.com/userhome/10504424','');OutputLastNextArt('jquery选择器的实现流程简析及提高性能建议!','http://www.360doc.com/content/13/1206/15/10504424_334969583.shtml',0);OutputLastNextArt('nicescroll 配置参数','http://www.360doc.com/content/13/1206/15/10504424_334970189.shtml',1);</script>
<script type="text/javascript" src="http://www.360doc.com/js/index7/newheader.js?t=2019091201"></script>
<script src="http://blockart.360doc.com/ajax/getstatusv2.ashx?aid=334970071" type="text/javascript" charset="utf-8" async="async"></script>
<script src="http://blockart.360doc.com/ajax/getartstatus.ashx?aid=545879295,231840927,330176798,861946993,314230465,269668383,375491633,1850080,236671577&callbackparam=doccheckarts" type="text/javascript" charset="utf-8" async="async"></script>
<script type="text/javascript">
var baiduImagePlus = {
noLogo: true,
unionId: 'u2617463',
maxMiniAdCount: 0,
formList: [{ formId: 10 }]
};
</script>
<script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/i.js"></script>
<script type="application/ld+json">
{
"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
"@id": "http://www.360doc.com/content/13/1206/15/10504424_334970071.shtml",
"title": "jQuery选择器",
"pubDate": "2013-12-06T15:08:33"
}
</script>
</body>
</html>
网友评论