Set element's pixelTop and pixelLeft to current mouse event (IE)
|
|
<html> <head> <title>A Simple Page</title> <script language="JavaScript"> <!-- function moved() { window.status = "Current mouse coordinates: X = " + event.x + " Y = " + event.y follower.style.pixelTop = event.y follower.style.pixelLeft = event.x } // --> </script> </head> <body onmousemove="moved()"> <p id="follower" style="position:absolute">Squeak!</p> </body> </html>
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|