zoukankan      html  css  js  c++  java
  • jquery事件解绑

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8" />
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <title></title>
            <script src="jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
    
            <script type="text/javascript">
                $(document).ready(function() {
                    $(document).click(function() {
                        alert("click")
                    });
    
                    $(document).unbind("click");
                    $(document).unbind("mouseenter");
                    $(document).undelegate("#box", "click");
                    $(document).off("click", "#box");
                });
            </script>
        </head>
        <body>
            <div id="box">
            </div>
        </body>
    </html>
  • 相关阅读:
    JS
    JS
    JS
    VUE
    element-ui 进入页面 message 自动触发的问题
    JS-数组中常用的方法
    CSS-transition简单过渡动画
    vue
    JS
    2021要买的书籍
  • 原文地址:https://www.cnblogs.com/zhangxuechao/p/13861661.html
Copyright © 2011-2022 走看看