国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > JavaScript > 正文

JS使用oumousemove和oumouseout動態改變圖片顯示的方法

2024-05-06 16:18:00
字體:
來源:轉載
供稿:網友

這篇文章主要介紹了JS使用oumousemove和oumouseout動態改變圖片顯示的方法,涉及javascript鼠標事件及圖片操作技巧,具有一定參考借鑒價值,需要的朋友可以參考下

本文實例講述了JS使用oumousemove和oumouseout動態改變圖片顯示的方法。分享給大家供大家參考。具體如下:

鼠標放到圖片上時圖片會自動變大,鼠標離開圖片還原

 

 
  1. <!DOCTYPE html> 
  2. <html> 
  3. <head> 
  4. <script> 
  5. function bigImg(x) 
  6. x.style.height="64px"
  7. x.style.width="64px"
  8. function normalImg(x) 
  9. x.style.height="32px"
  10. x.style.width="32px"
  11. </script> 
  12. </head> 
  13. <body> 
  14. <img onmouseover="bigImg(this)" onmouseout="normalImg(this)" 
  15. border="0" src="smiley.gif" alt="Smiley" width="32" height="32"
  16. <p>The function bigImg() is triggered when the user moves 
  17. the mouse pointer over the image.</p> 
  18. <p>The function normalImg() is triggered when the mouse 
  19. pointer is moved out of the image.</p> 
  20. </body> 
  21. </html> 

希望本文所述對大家的javascript程序設計有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 辰溪县| 延川县| 枞阳县| 平昌县| 肥城市| 深圳市| 彭水| 潜江市| 舟曲县| 卫辉市| 保定市| 山西省| 平邑县| 苏尼特右旗| 大埔区| 兴国县| 西昌市| 仙居县| 长寿区| 雅安市| 陕西省| 甘洛县| 肥东县| 新竹市| 方城县| 安溪县| 吉木萨尔县| 巴塘县| 平湖市| 建始县| 门头沟区| 永顺县| 黎川县| 河西区| 刚察县| 民丰县| 浦县| 安泽县| 图木舒克市| 改则县| 朝阳县|