Alpha图像链接

  1. <html>
  2. <head>
  3. <style>
  4. img
  5. {
  6. filter:alpha(opacity=10)
  7. }
  8. </style>
  9. <script type="text/javascript">
  10. function clean()
  11. {
  12. interval=setInterval("makeclean(myImage)",10)
  13. }
  14. function foggy()
  15. {
  16. clearInterval(interval)
  17. document.getElementById('myImage').filters.alpha.opacity=10
  18. }
  19. function makeclean()
  20. {
  21. if (document.getElementById('myImage').filters.alpha.opacity<100)
  22. {
  23. document.getElementById('myImage').filters.alpha.opacity+=5
  24. }
  25. else if (window.interval)
  26. {
  27. clearInterval(interval)
  28. }
  29. }
  30. </script>
  31. </head>
  32.  
  33. <body>
  34. <b>请把鼠标移动到图像链接上:</b><br />
  35. <a href="/index.html">
  36. <img border="0" id="myImage" src="/i/eg_smile.gif" onmouseover="clean()" onmouseout="foggy()" />
  37. </a>
  38. </body>
  39.  
  40. </html>