e.cancelBubble 该属性阻止冒泡 非标准 ie6-8使用
e.returnValue 该属性阻止默认事件(默认行为)非标准 ie6-8使用比如不让链接跳转
[常用]e.preventDefault() 该方法阻止默认事件(默认行为) 标准 比如不让链接跳转
[常用]e.stopPropagation() 阻止冒泡 标准
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<a href="http://www.baidu.com">百度一下你就知道</a>
<script>
var a = document.getElementsByTagName('a')[0]
a.addEventListener('click',function(e){
if(e.returnValue){
e.returnValue = false
}else{
e.preventDefault()
}
alert('阻止默认事件成功')
})
</script>
</body>
</html>