<!DOCTYPE html>
<html>
<head>
<title>jQuery event.which property (for mouse button)</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("div").mousedown(function(event){
$("span").append("Mouse button Pressed: " + event.which + "<br />");
});
});
</script>
<style>
div {
width: 400px;
height: 200px;
border: 1px solid black;
}
</style>
</head>
<body>
<p>Mouse button click on below div element.</p>
<div>
<span></span>
</div>
</body>
</html>