ancestor descendant
所有的匹配的后代元素都符合条件
<!DOCTYPE html>
<html>
<head>
<title>selectorl.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$("form input").css("color","red");
$("form input").val("111111");
});
</script>
</head>
<body>
<div>
<p>
ancestor descendant 后代选择器
parent > child 子选择器
prev + next 紧接的下一个选择器
prev ~ siblings 以后的所有兄弟元素
</p>
</div>
<div>
<form>
<label>Name:</label>
<input name="name" />
<fieldset>
<label>Newsletter:</label>
<input name="newsletter" />
</fieldset>
</form>
<input name="none" />
</div>
</body>
</html>
parent > child
子选择器
prev + next
匹配所有紧接在 prev 元素后的下一个 next 元素
prev ~ siblings
以后的所有兄弟元素