指针图像

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function cursor(image)
  5. {
  6. trail.innerHTML="<img src='" + image + "' />"
  7. trail.style.visibility="visible"
  8. trail.style.position="absolute"
  9. trail.style.left=event.clientX+10
  10. trail.style.top=event.clientY
  11. }
  12.  
  13. function hidecursor()
  14. {
  15. trail.style.visibility="hidden"
  16. }
  17. </script>
  18.  
  19. </head>
  20. <body>
  21.  
  22. <h1>请把鼠标移动到链接上:</h1>
  23.  
  24. <a href="/index.html" onmousemove="cursor('/i/logo_white.gif')" onmouseout="hidecursor()">jishuchi.com</a><br />
  25. <a href="http://www.altavista.com" onmousemove="cursor('/i/eg_altavistalink.gif')" onmouseout="hidecursor()">AltaVista</a><br />
  26. <a href="http://www.yahoo.com" onmousemove="cursor('/i/eg_yahoo.gif')" onmouseout="hidecursor()">Yahoo!</a><br />
  27.  
  28. <span id="trail" style="visibility:hidden">Hello</span>
  29.  
  30. </body>
  31. </html>