[Beschreibung]
Ein Fadenkreuz folgt dem Mauszeiger.
[Kompatibilität]
[Code]
<style> <!-- #leftright, #topdown{ position:absolute; left:0; top:0; width:1px; height:1px; layer-background-color:blue; background-color:blue; z-index:100; font-size:1px; } --> </style>
<div id="leftright" style="width:expression(document.body.clientWidth-2)"></div> <div id="topdown" style="height:expression(document.body.clientHeight-2)"></div>
<script language="JavaScript"> <!-- /* jason theis,http://members.tripod.com/b-lueflame modified by N8i (www.nightfire.ch) */ //Browser Sniffer var ns4up = (document.layers) ? 1 : 0; var ie4up = (document.all) ? 1 : 0; var mozup = (!document.all && document.getElementById) ? 1 : 0; if (ie4up){ Sleftright = leftright.style Stopdown = topdown.style Sleftright.width=document.body.clientWidth-2 Stopdown.height=document.body.clientHeight-2 } if (mozup){ Sleftright = document.getElementById("leftright").style Stopdown = document.getElementById("topdown").style Sleftright.width = window.innerWidth - 2 Stopdown.height = window.innerHeight-2 } else if (ns4up){ Sleftright = document.leftright.clip Stopdown = document.topdown.clip Sleftright.width = window.innerWidth Sleftright.height = 1 Stopdown.width = 1 Stopdown.height = window.innerHeight } function handlerMM(e) { x = (ns4up || mozup) ? e.pageX : document.body.scrollLeft+event.clientX; y = (ns4up || mozup) ? e.pageY : document.body.scrollTop+event.clientY; if (ie4up) { Sleftright.pixelTop = y + 1; Stopdown.pixelLeft = x + 1; if (event.clientX<document.body.clientWidth-2) { topdown.style.pixelLeft = document.body.scrollLeft+event.clientX+1 } else { topdown.style.pixelLeft = document.body.clientWidth-2 } } if (mozup || ns4up) { Sleftright.top = y + 1 Stopdown.top = pageYOffset Stopdown.left = x + 1 } } if (ie4up || mozup) document.onmousemove=handlerMM else if (ns4up){ window.captureEvents(Event.MOUSEMOVE) window.onmousemove=handlerMM } function regenerate(){ window.location.reload() } function regenerate2(){ setTimeout("window.onresize=regenerate",400) } if (ns4up) //if the user is using NS 4 window.onload=regenerate2 //--> </script>
Jason Theis modified by N8i (www.nightfire.ch)
kopieren Sie bitte den Quellcode