久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      jquery中hover函數(shù)有幾個(gè)參數(shù)

      jquery中的hover函數(shù)有2個(gè)參數(shù):1、必需參數(shù)“inFunction”,用于規(guī)定mouseenter事件發(fā)生時(shí)運(yùn)行的事件處理函數(shù);2、可選參數(shù)“outFunction”,用于規(guī)定mouseleave事件發(fā)生時(shí)運(yùn)行的事件處理函數(shù)。

      jquery中hover函數(shù)有幾個(gè)參數(shù)

      本教程操作環(huán)境:windows7系統(tǒng)、jquery1.10.2版本、Dell G3電腦。

      在jquery中,hover() 方法規(guī)定當(dāng)鼠標(biāo)指針懸停在被選元素上時(shí)要運(yùn)行的兩個(gè)函數(shù)。

      該方法會(huì)觸發(fā) mouseenter 和 mouseleave 事件。

      因此,hover函數(shù)接受兩個(gè)參數(shù):一個(gè)必需,一個(gè)可省略。

      語(yǔ)法:

      $(selector).hover(inFunction,outFunction)
      參數(shù) 描述
      inFunction 必需。規(guī)定 mouseenter 事件發(fā)生時(shí)運(yùn)行的函數(shù)。
      outFunction 可選。規(guī)定 mouseleave 事件發(fā)生時(shí)運(yùn)行的函數(shù)。

      注意:如果只規(guī)定了一個(gè)函數(shù),則它將會(huì)在 mouseenter 和 mouseleave 事件上運(yùn)行。

      示例:當(dāng)鼠標(biāo)指針懸停在上面時(shí),改變 <p> 元素的背景顏色

      <!DOCTYPE html> <html>  	<head> 		<meta charset="UTF-8"> 		<script src="js/jquery-1.10.2.min.js"></script> 		<script> 			$(document).ready(function() { 				$("p").hover(function() { 					$("p").css("background-color", "yellow"); 				}, function() { 					$("p").css("background-color", "pink"); 				}); 			}); 		</script> 	</head> 	<body>  		<p>鼠標(biāo)移動(dòng)到該段落。</p>  	</body> </html>

      jquery中hover函數(shù)有幾個(gè)參數(shù)

      【推薦學(xué)習(xí):jQuery視頻教程、web前端視頻】

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)