jquery连式操作
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style>
p{
display: none;
}
</style>
</head>
<body>
<h2>链式操作</h2>
<p>开学了,盛邦升华</p>
<script src="js/jquery-3.4.1.js"></script>
<script>
$("h2").click(function(){
$(this).css("background","red").next().css("display","block")
})
</script>
</body>
</html>