,<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="./script/jquery-1.4.2.min.js"></script>
<script>
$(document).ready(function(){
//$("#p").click(function(){alert ('css')});
var $p=$("#p > p");
$p.click(function(){
alert("嗯,还好");
});
//var $tr=$("#tr tr=even");
//$tr.css("background","red");
$("#trs tr:even").css("background","red");
});
</script>
</head>
<body>
<div id="p">
<p>第一个东东</p>
<p>第2个东东</p>
<p>第3个东东</p>
<p>第4个东东</p>
</div>
<table id="trs">
<tr><td>333</td><td>444</td></tr>
<tr><td>555</td><td>666</td></tr>
<tr><td>777</td><td>222</td></tr>
<tr><td>111</td><td>443</td></tr>
</table>
</body>
</html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="./script/jquery-1.4.2.min.js"></script>
<script>
$(document).ready(function(){
//$("#p").click(function(){alert ('css')});
var $p=$("#p > p");
$p.click(function(){
alert("嗯,还好");
});
//var $tr=$("#tr tr=even");
//$tr.css("background","red");
$("#trs tr:even").css("background","red");
});
</script>
</head>
<body>
<div id="p">
<p>第一个东东</p>
<p>第2个东东</p>
<p>第3个东东</p>
<p>第4个东东</p>
</div>
<table id="trs">
<tr><td>333</td><td>444</td></tr>
<tr><td>555</td><td>666</td></tr>
<tr><td>777</td><td>222</td></tr>
<tr><td>111</td><td>443</td></tr>
</table>
</body>
</html>