View Full Version : i wanna code for show x:y on image ??
ekaja
02-05-2003, 04:40 AM
umm..
i want code
onmouseover on image
show X Y
thx
joh6nn
02-05-2003, 04:59 AM
what?
ekaja
02-05-2003, 05:49 AM
i have image
i want show x:y[width:height] mouse part on image
Dylan Leblanc
02-05-2003, 06:49 AM
So when the mouse pointer is put over top of the image, the X and Y coordinates relative to the image will be displayed?
Roelf
02-05-2003, 08:50 AM
this works in IE 5.5:
<html>
<head>
<title>Coordinates</title>
<script type="text/javascript">
function showcoords() {
var x=0,y=0;
x = event.offsetX;
y = event.offsetY;
window.status = "x = " + x + ", y = " + y;
return (true)
}
</script>
</head>
<body>
<img src="yourpic.jpg" onmousemove="showcoords()" />
</body>
</html>
ekaja
02-05-2003, 05:14 PM
Thank You :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.