显示 隐藏 显示隐藏
<!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" />
<link rel="stylesheet" type="text/css" href="js/88.css"/>
<title>Document</title>
<style>
div{
width: 200px;
height: 200px;
background: red;
}
</style>
</head>
<body>
<button>显示</button>
<button>隐藏</button>
<button>显示隐藏</button>
<div></div>
</ul>
<script src="js/jquery-3.4.1.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
$("button").eq(0).click(function(){
$("div").show();
});
$("button").eq(1).click(function(){
$("div").hide();
});
$("button").eq(2).click(function(){
$("div").toggle();
});
});
</script>
</body>
</html>