JS鼠標移動切換圖片


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

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM