2.点击隐藏盒子

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jQuery入口函数</title>
    <script src="jquery-3.3.1.js"></script>
    <style>
        div{
            height: 300px;
            background: pink;
        }
    </style>
    <script>
        $(function () {
            $("button").click(function () {
                $("div").hide();
            })
        })
    </script>
</head>
<body>
<button>点击隐藏盒子</button>
<div></div>
</body>
</html>
原文地址:https://www.cnblogs.com/alex-xxc/p/9738746.html