第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

求解這個(gè)e是什么意思,我知道是事件對(duì)象

<!DOCTYPE html>

<html>


<head>

? ? <meta http-equiv="Content-type" content="text/html; charset=utf-8" />

? ? <title></title>

? ? <style>

? ? .left div,

? ? .right div {

? ? ? ? width: 350px;

? ? ? ? height: 150px;

? ? ? ? padding: 5px;

? ? ? ? margin: 5px;

? ? ? ? border: 1px solid #ccc;

? ? }

? ? p{

? ? ? ? height: 50px;

? ? ? ? border: 1px solid red;

? ? ? ? margin: 30px;

? ? }

? ? .left div {

? ? ? ? background: #bbffaa;

? ? }

? ? .right div {

? ? ? ? background: yellow;

? ? }

? ? </style>

? ? <script src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script>

</head>


<body>

? ? <h2>mouseover與mouseout事件</h2>


? ? <h4>測(cè)試一</h4>

? ? <button>點(diǎn)擊:指定觸發(fā)mouseover事件</button>

? ? <script type="text/javascript">

? ? ? ? $('h2').mouseover(function(e) {

? ? ? ? ? ? alert('觸發(fā)h2元素綁定的mouseover')

? ? ? ? })

? ? ? ? $("button:eq(0)").click(function(e) {

? ? ? ? ? ? $('h2').mouseover() //指定觸發(fā)綁定的事件

? ? ? ? })

? ? </script>

? ??

? ??

? ? <h4>測(cè)試二</h4>

? ? <div class="left">

? ? ? ? <div class="aaron1">

? ? ? ? ? ? <p>鼠標(biāo)移進(jìn)此區(qū)域觸發(fā)mouseover事件</p>

? ? ? ? ? ? <a>進(jìn)入元素內(nèi)部,mouseover事件觸發(fā)次數(shù):</a>

? ? ? ? </div>

? ? </div>

? ? <script type="text/javascript">

? ? ? ? var n = 0;

? ? ? ? //綁定一個(gè)mouseover事件

? ? ? ? $(".aaron1 p:first").mouseover(function(e) {

? ? ? ? ? ? $(".aaron1 a").html('進(jìn)入元素內(nèi)部,mouseover事件觸發(fā)次數(shù):' + (++n))

? ? ? ? })

? ? </script>

? ??

? ??

? ? <h4>測(cè)試三</h4>

? ? <div class="right">

? ? ? ? <div class="aaron2">

? ? ? ? ? ? <p>鼠標(biāo)移動(dòng):不同函數(shù)傳遞數(shù)據(jù)</p>

? ? ? ? ? ? <a>進(jìn)入元素內(nèi)部,mouseover事件觸發(fā)次數(shù):</a>

? ? ? ? </div>

? ? </div>

? ? <br/>

? ? <script type="text/javascript">

? ? ? ? var n = 0;

? ? ? ? //不同函數(shù)傳遞數(shù)據(jù)

? ? ? ? function data(e) {

? ? ? ? ? ? $(".right a").html('mouseover事件觸發(fā)次數(shù):' + (++n) + '<br/> 傳入數(shù)據(jù)為 :'+ e.data)

? ? ? ? }


? ? ? ? function a() {

? ? ? ? ? ? $(".right p:first").mouseover('data = 慕課網(wǎng)', data)

? ? ? ? }

? ? ? ? a();


? ? </script>

</body>


</html>


正在回答

2 回答

當(dāng)然是傳入函數(shù)里的數(shù)據(jù)啦

0 回復(fù) 有任何疑惑可以回復(fù)我~

傳遞的參數(shù)

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

我要去幼兒園深造了 提問者

那為什么要e.data呢
2016-08-08 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕粉3596880 回復(fù) 我要去幼兒園深造了 提問者

e只是參數(shù),任意取值,而這個(gè)data指的是 $(".right p:first").mouseover('data = 慕課網(wǎng)', data)里的 參數(shù),e.data是目標(biāo)數(shù)據(jù)的意思,這個(gè)目標(biāo)是函數(shù)a
2016-08-08 回復(fù) 有任何疑惑可以回復(fù)我~
#3

我要去幼兒園深造了 提問者

我還想問一個(gè),就是mouseover里的那兩個(gè)參數(shù),后面一個(gè)是代表調(diào)用data函數(shù)那第一個(gè)代表什么
2016-08-09 回復(fù) 有任何疑惑可以回復(fù)我~
#4

Fstar 回復(fù) 我要去幼兒園深造了 提問者

代表賦值給e.data,傳入到函數(shù)data里面的
2016-08-10 回復(fù) 有任何疑惑可以回復(fù)我~
#5

雨宮奏 回復(fù) 我要去幼兒園深造了 提問者

通過event.data傳遞給事件處理函數(shù)的數(shù)據(jù)
2016-08-27 回復(fù) 有任何疑惑可以回復(fù)我~
#6

雨宮奏 回復(fù) 我要去幼兒園深造了 提問者

不好意思,沒注意看人家已經(jīng)回答了。
2016-08-27 回復(fù) 有任何疑惑可以回復(fù)我~
查看3條回復(fù)

舉報(bào)

0/150
提交
取消

求解這個(gè)e是什么意思,我知道是事件對(duì)象

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)