亚洲区国产区激情区无码区,国产成人mv视频在线观看,国产A毛片AAAAAA,亚洲精品国产首次亮相在线

HTML 參考手冊

HTML 標簽大全

HTML onmouseover事件屬性

onmouseover屬性用來獲取或設置當前元素的mouseover事件的事件處理函數(shù)

HTML 事件屬性

在線示例

當鼠標指針移至圖片之上時運行腳本:

<!DOCTYPE html>
<html>
<head>
<title>HTML onmouseover 事件屬性的使用(菜鳥教程 cainiaoplus.com)</title>
</head>
<body>
<img onmouseover="bigImg(this)" onmouseout="normalImg(this)" border="0" src="pig.gif" alt="pig" width="32" height="32">
<p>用戶將鼠標懸停在圖像上時,將觸發(fā)bigImg()函數(shù)。此功能放大圖像。
當鼠標指針移出圖像時,將觸發(fā)normalImg()函數(shù)。該功能將圖像的高度和寬度設置為正常。</p>
<script>
function bigImg(x) {
  x.style.height = "64px";
  x.style.width = "64px";
}

function normalImg(x) {
  x.style.height = "32px";
  x.style.width = "32px";
}
</script>
</body>
</html>
測試看看 ?/?

瀏覽器兼容性

IEFirefoxOperaChromeSafari

所有主流瀏覽器都支持 onmouseover 事件屬性

定義和用法

當鼠標指針移到某個元素上時,會觸發(fā)onmouseover屬性。

提示: onmouseover屬性通常與onmouseout屬性一起使用。

注意: onmouseover 屬性不能使用于以下元素:<base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, 或<title>。

HTML 4.01 與 HTML5之間的差異

沒有。

語法

<element onmouseover="script">

屬性值

描述
script規(guī)定該onmouseover事件觸發(fā)時執(zhí)行的腳本。
HTML 事件屬性