<!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>