Piszę mały kodzik na strone internetową. Chciałem zrobić interaktywną mapę. Ale mam problem, z zmienieniem kursora myszki... Oto mój kodzik:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> function point_it(event){ pos_x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("pointer_div").offsetLeft; pos_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById("pointer_div").offsetTop; document.getElementById("cross").style.left = (pos_x-9) ; document.getElementById("cross").style.top = (pos_y-9) ; document.getElementById("cross").style.visibility = "visible" ; document.pointform.form_x.value = pos_x; document.pointform.form_y.value = pos_y; } function cursor_on(event) { this.style.cursor='crosshair'; } </script> </head> <body> <form name="pointform" method="post"> <div id="pointer_div" onmouseover="cursor_on(event)" onclick="point_it(event)" style = "background-image:url('images/mapa.jpg');width:1344px;height:1195px;"> <img src="kropa.gif" id="cross" style="position:relative;visibility:hidden;z-index:2;" width="20" height="20"> </div> <br /> </form> </body> </html>
Wszystko bez próbowania zmienić kursora, działało dobrze, ale teraz się wszystko psuje...
Może ktoś pomóc?