Program Demo
<html>
<head>
<title>Capture Mouse Click Event</title>
<script language="javascript">
function noLeftClick()
{
switch (event.button)
{
case 1:
alert('You Clicked Left-Click ');
break;
case 2:
alert('You Clicked Right-Click.');
break;
}
}
document.onmousedown=noLeftClick
</script>
</head>
<body>
<h5>Click Any Were Within Browser</h3>
</body>
</html>
Note:IE Supported
No comments:
Post a Comment