<script type="text/javascript">
var one=document.getElementById('one');
var two=document.getElementById('two');
var href=document.getElementById('href');
//阻止冒泡start
one.onclick=function(){
alert("one");
}
two.onclick=function(e){
var oEvent = e || event;
oEvent.stopPropagation();
alert("two");
}
//阻止冒泡end
//阻止默认事件start
href.onclick=function(e){
alert("超链接");
var oEvent = e || event;
oEvent.preventDefault();
return false;
}
//阻止默认事件end
</script>