Groups | Blog | Home
all groups > dotnet jscript > september 2004 >

dotnet jscript : Mouse Status



ruca
9/2/2004 3:56:43 PM
Hi,

How can I know in JavaScript the status of mouse (down, up, pressed,
etc)????
Give me examples, please.


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Karl
9/2/2004 5:00:57 PM
Something like this perhaps:

<html>
<head>
</head>
<body>
<div id="Status"></div>
</body>
</html>
<script language="javascript">
document.onmousedown=mousedown;
document.onmouseup=mouseup;

var div = document.getElementById("Status");
function mousedown(){
div.innerHTML += "down<br />";
}

function mouseup(){
div.innerHTML += "up<br />";
}
</script>


Karl

[quoted text, click to view]

AddThis Social Bookmark Button