$('#div1').click(function(ev){ alert(ev.which);//1是鼠标左键,2是鼠标中见,3是鼠标右键})
来源: http://www.bubuko.com/infodetail-1869689.html