JavaScript鼠标滑过图片,图片变换的效果
<!-- Experiments with images vegaseat 6/15/04 --> <!-- onMouseOver, onMouseOut, JS --> <html> <head> <title>Swap Images with onMouseOver and onMouseOut</title> </head> <body bgcolor="#FFFFCC" text="#3300FF"> <CENTER> <FORM NAME = form1> <H2> Move the mouse across to swap the image ... </H2> <A HREF="" name= link1 onMouseOver = "ImgOver()" onMouseOut = "ImgOut()"> <IMG NAME = "IMG1" SRC = "c:/windows/web/wallpaper/follow.jpg" WIDTH = 800 HEIGHT = 600> </A> </CENTER> <SCRIPT LANGUAGE= JavaScript> function ImgOver() { // use an image file you have or use one of XP's wallpaper document.form1.IMG1.src = 'c:/windows/web/wallpaper/home.jpg'; } function ImgOut() { // use an image file you have or use one of XP's wallpaper document.form1.IMG1.src = 'c:/windows/web/wallpaper/follow.jpg'; } </SCRIPT> </body> </html>