Jump to content

wildvirus

Newbie
  • Posts

    1
  • Joined

  • Last visited

Everything posted by wildvirus

  1. 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>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy