ya xocu wtobi kokda ya najmu kakoy nibut pozicsiyu iz karti on pokajet menya x=..... ,y = ..... ,i ya moqu izmenit x,y esli ne tocna najal. <html> <body> <form name="Show"> <input type="text" name="MouseX" value="0" size="4"> X<br> <input type="text" name="MouseY" value="0" size="4"> Y<br> </form> <script language="JavaScript1.2"> <!-- var IE = document.all?true:false var targ; if (!IE) document.captureEvents(Event.MOUSEMOVE) document.onmousemove = getMouseXY; var tempX = 0 var tempY = 0 function getMouseXY(e) { if (IE) { tempX = event.clientX + document.body.scrollLeft tempY = event.clientY + document.body.scrollTop var e=window.event; } else { tempX = e.pageX tempY = e.pageY } if (e.srcElement) { targ=e.srcElement; } if (tempX < 0){tempX = 0} if (tempY < 0){tempY = 0} document.Show.MouseX.value = tempX document.Show.MouseY.value = tempY var tname; tname=targ.tagName; alert("You clicked on a " + tname + " element."); return true } </script> <body onmousedown="whichElement(event)"> <img border="0" src="ball16.gif" width="29" height="28" alt="Ball"> </body> </html>