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

jQuery事件小結(jié)

原創(chuàng) 2018-11-18 13:38:20 231
摘要:<!DOCTYPE html><html><head> <title>jQuery事件</title> <script type="text/javascript" src="js/jquery-3-3.1.min.js"></script> <script type=

<!DOCTYPE html>

<html>

<head>

<title>jQuery事件</title>

<script type="text/javascript" src="js/jquery-3-3.1.min.js"></script>

<script type="text/javascript">


</script>

</head>

<body>

<script type="text/javascript">

// mouseover() 當(dāng)鼠標(biāo)指針位于元素上方時會發(fā) mouseover事件

// mouseenter() 當(dāng)鼠標(biāo)指針穿過元素時會發(fā)生 mouseenter事件

// mousemove() 當(dāng)鼠標(biāo)在指定元素中移動時,就會發(fā)生該事件

// mouseleave() 當(dāng)鼠標(biāo)指針離開元素時

// mouseout() 當(dāng)鼠標(biāo)指針從元素移開時

// mousedown() 當(dāng)鼠標(biāo)指針移動到元素上方并按下鼠標(biāo)按鍵時

// mouseup() 當(dāng)在元素上松開鼠標(biāo)按鍵時

// resize() 當(dāng)調(diào)整當(dāng)前瀏覽器窗口大小時

// pageX() 屬性是鼠標(biāo)指釷的位置,相對于文檔的左邊緣

// pageY() 屬性是鼠標(biāo)指針的位置,相對于文檔的上邊緣

$(document).ready(function(){

$(document).mousemove(function(aa){

$('span').text('x: '+aa.pageX+'y: '+aa.pageY)

})


})

</script>


<div>

當(dāng)前鼠標(biāo)的位置:<span> </span>

</div>

</body>

</html>

我測試到,沒有顯示鼠標(biāo)位置顯示 

發(fā)布手記

熱門詞條