<div id="btn">点击</div>document.getElementById("btn").onmousedown = function(e){ if(e.button ==2){ //右键 }
if(e.button ==0){ //左键 }
if(e.button ==0){ //滚轮 }
}