指针描述

  1. <html>
  2. <head>
  3. <style>
  4. body
  5. {
  6. background:#000000;
  7. color:#00FF00;
  8. font-weight:bold;
  9. }
  10. a{color:#CCCCCC;}
  11. </style>
  12.  
  13. <script type="text/javascript">
  14. function cursor(text)
  15. {
  16. trail.innerHTML=text
  17. trail.style.visibility="visible"
  18. trail.style.position="absolute"
  19. trail.style.left=event.clientX+10
  20. trail.style.top=event.clientY
  21. }
  22.  
  23. function hidecursor()
  24. {
  25. trail.style.visibility="hidden"
  26. }
  27. </script>
  28.  
  29. </head>
  30. <body>
  31.  
  32. <h1>请把鼠标移动到链接上:</h1>
  33.  
  34. <a href="/index.html" onmousemove="cursor('访问 jishuchi.com')" onmouseout="hidecursor()">jishuchi.com</a><br />
  35. <a href="http://www.altavista.com" onmousemove="cursor('转到 AltaVista')" onmouseout="hidecursor()">AltaVista</a><br />
  36. <a href="http://www.yahoo.com" onmousemove="cursor('使用 Yahoo 进行搜索!')" onmouseout="hidecursor()">Yahoo!</a><br />
  37.  
  38. <span id="trail" style="visibility:hidden">Hello</span>
  39.  
  40. </body>
  41. </html>