B€ST4Y()U

* Best4you.wgz.cz To sú programy, hudba, recenzie, HTML, BBCode, PC about a veľa iného. Všetko, čo potrebuješ na jednom mieste *

Štatistika

TOPlist

Ukazovateľ polohy myši (os X a Y)

Tento script nemá ani tak praktické využitie, je to skôr "kozmetická úprava" webu:

<form name="Show">
X <input type="text" name="MouseX" value="0" size="4"><br>
Y <input type="text" name="MouseY" value="0" size="4"><br>
</form>

<script language="JavaScript1.2">

<!--
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;
function getMouseXY(e) {
if (IE) { // grab the x-y pos.s if browser is IE
tempX = event.clientX + document.body.scrollLeft;
tempY = event.clientY + document.body.scrollTop;
}
else {  // grab the x-y pos.s if browser is NS
tempX = e.pageX;
tempY = e.pageY;
}
if (tempX < 0){tempX = 0;}
if (tempY < 0){tempY = 0;}
document.Show.MouseX.value = tempX;
document.Show.MouseY.value = tempY;
return true;
}
//-->
</script>

 
| Hosting: webgarden.cz | Designed by 1predator123 | ©Best4you. All rights reserved. |