代码:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="js/jquery.js"></script>
</head>
<style>
div{
height: 200px;
width: 200px;
background-color: blue;
}
</style>
<body>
<div>
<p>我是第一个P元素</p>
<p id="th">我是第二个P元素</p>
<p>我是第三个P元素</p>
</div>
<script type="text/javascript">
$(function(){
$("div").on("click",function(){
$("#th").css("background-color","orange");
});
});
</script>
</body>
</html>