<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#two{width:100px;height:100px;border:1px solid #000;background:blue;}
div{width:200px;height:100px;border:1px solid #000;}
</style>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function(){
//$("div:contains('div')").css("background","yellow")----------选取含有文本内容“div”的元素
//$("div:empty").css("background","yellow")-------------选取不包含子元素或者文本的空元素
//$("div:has(ul)").css("background","yellow")---------选取含有选择器所匹配的元素的元素
//$("div:parent").css("background","yellow")-----------选取含有子元素或则文本的元素,与empty是相反的
//$("div:hidden").css({background:"red",display:"block"})-----改变隐藏元素的状态
//$("div:visible").css("background","yellow")------选取所有的可见
</script>
</head>
<body>
<table width="430" border="1" cellspacing="2" cellpadding="10">
<tr id="one">
<td>1</td>
</tr>
<tr>
<td>2</td>
</tr>
<tr>
<td>3</td>
</tr>
<tr>
<td>4</td>
</tr>
<tr>
<td>5</td>
</tr>
<tr>
<td>6</td>
</tr>
<tr>
<td>7</td>
</tr>
</table>
<h3>改变标题的原色</h3>
<div id="two">这是一个动画盒子</div>
<div>
<ul>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
</ul>
</div>
<div>
<ul>
<li>1</li>
<li>1</li>
</ul>
</div>
<div>第一个div</div>
<div>
<p>2222222222</p>
</div>
<div></div>
</body>
</html>