$('#btn').mousedown(function(event) {
switch (event.which) {
case 1:
alert('左键');
break;
case 2:
alert('中键');
break;
case 3:
alert('右键');
break;
default:
alert('不可识别');
}
});