<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>JS鼠标移动切换图片</title> <script> function showDaTu(src){ document.getElementById("defaultImg").src=src; } </script> </head> <body> <img src="images/big_x1.jpg" id="defaultImg"> <br><br><br> <img src='images/small_x2.jpg' onmouseover="showDaTu('images/big_x2.jpg')"> <img src='images/small_x3.jpg' onmouseover="showDaTu('images/big_x3.jpg')"> <img src='images/small_x4.jpg' onmouseover="showDaTu('images/big_x4.jpg')"> <img src='images/small_x5.jpg'onmouseover="showDaTu('images/big_x5.jpg')"> <br>因图片较大,请等待图片加载完成……然后鼠标放小图上就会 </body> </html>