亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JavaScript Reference Manual / onmousemove 事件

onmousemove 事件

onmousemove 事件

實(shí)例

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<script>
function bigImg(x){
	x.style.height="64px";
	x.style.width="64px";
}
function normalImg(x){
	x.style.height="32px";
	x.style.width="32px";
}
</script>
</head>
<body>

<img onmousemove="bigImg(this)" onmouseout="normalImg(this)" border="0" src="smiley.gif" alt="Smiley" width="32" height="32">
<p>函數(shù) bigImg() 在鼠標(biāo)指針移動(dòng)到笑臉圖片是觸發(fā)。</p>
<p>函數(shù) normalImg() 在鼠標(biāo)指針移出笑臉圖片是觸發(fā)。</p>

</body>
</html>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例


定義和用法

onmousemove 事件會(huì)在鼠標(biāo)指針移出指定的對(duì)象時(shí)發(fā)生。

語(yǔ)法

In HTML:

<elementonmousemove="SomeJavaScriptCode">

In JavaScript:

object.onmousemove=function(){SomeJavaScriptCode};

參數(shù)描述
SomeJavaScriptCode必需。規(guī)定該事件發(fā)生時(shí)執(zhí)行的 JavaScript。


瀏覽器支持

QQ截圖20161108165429.png

所有主要瀏覽器都支持 onmousemove 事件


支持該事件的 HTML 標(biāo)簽:

onmousemove 屬性可用于使用 HTML 元素,除了: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>.