首页 > 应用开发 > > 为什么不能删除事件?
<!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/ ,如需转载,请注明出处,否则将追究法律责任。