ITPub博客

首页 > 应用开发 > > 为什么不能删除事件?

为什么不能删除事件?

作者:duanhao 时间:2019-11-05 13:46:38 0 删除 编辑
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
         
    </head>
    <body>
        <input type="button" id="oo" value="123456789" />
    </body>
    <script>
        var oo=document.getElementById('oo');
        oo.addEventListener('click',function(){alert('hh')},false);
        oo.removeEventListener('click',function(){alert('hh')},false);
    </script>
</html>


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1343/viewspace-3128085/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-09-06

  • 博文量
    739
  • 访问量
    25545