非选择器
jQuery( ":not(selector)" )
例:找出所有input标签为非"checked"的,并且高亮其邻居元素span。
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title>not
demo</title>
<style>
</style>
<script src="js/jquery-1.9.1.min.js"></script>
</head>
<body>
<div>
<input
type="checkbox" name="a"/>
<span>Mary</span>
</div>
<div>
<input type="checkbox"
name="b"/>
<span>lcm</span>
</div>
<div>
<input type="checkbox"
name="c" checked="checked"/>
<span>Peter</span>
</div>
<script>
$("input:not(:checked) + span").css("background-color","yellow");
$("input").attr("disabled","disabled");
</script>
</body>
</html>