改变图像的位置

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function moveleft()
  5. {
  6. document.getElementById('image').style.position="absolute"
  7. document.getElementById('image').style.left="0"
  8. }
  9. function moveback()
  10. {
  11. document.getElementById('image').style.position="relative"
  12. }
  13. </script>
  14. </head>
  15.  
  16. <body>
  17.  
  18. <img id="image" src="/i/eg_bulbon.gif"
  19. onmouseover="moveleft()"
  20. onmouseout="moveback()" />
  21.  
  22. </body>
  23. </html>