改变图像的来源

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function moveover()
  5. {
  6. document.getElementById('image').src="/i/eg_bulbon.gif"
  7. }
  8. function moveback()
  9. {
  10. document.getElementById('image').src="/i/eg_bulboff.gif"
  11. }
  12. </script>
  13. </head>
  14.  
  15. <body>
  16.  
  17. <b>请把鼠标移动到图像上:</b><br />
  18. <img id="image" src="/i/eg_bulboff.gif"
  19. onmouseover="moveover()"
  20. onmouseout="moveback()" />
  21.  
  22. </body>
  23. </html>