//把這段代碼刪了測試三依然可以執(zhí)行
function data(e) {
alert(e.data) //1111
}
function data(e) {
alert(e.data) //1111
}
2016-10-22
bottonName = bottonName||'first'; 這句話是表示如果bottomName為空,則賦值為‘frist’,如果不為空則是bottomName...
2016-10-21
W3C中就總結(jié)了兩句話:
不論鼠標(biāo)指針穿過被選元素或其子元素,都會觸發(fā)mouseover事件
只有鼠標(biāo)指針穿過被選元素時,才能觸發(fā)mouseenter事件
不論鼠標(biāo)指針穿過被選元素或其子元素,都會觸發(fā)mouseover事件
只有鼠標(biāo)指針穿過被選元素時,才能觸發(fā)mouseenter事件
2016-10-21
<div id='bg' style='height:200px;width:300px;background:gray;'></div>
<div id='cube' style='height:20px;width:20px;position:absolute;background:blue;'></div>
<script >
$('#bg').mousemove(function(e){
$('#cube').css('left',e.pageX);
$('#cube').css('top',e.pageY);
})
</script>
<div id='cube' style='height:20px;width:20px;position:absolute;background:blue;'></div>
<script >
$('#bg').mousemove(function(e){
$('#cube').css('left',e.pageX);
$('#cube').css('top',e.pageY);
})
</script>
2016-10-18
我覺得老師的例子舉得不太適合,個人在“筆記”當(dāng)中記錄了認(rèn)為比較適合于理解--阻止冒泡的方法
2016-10-18
$('#msg').html($('#msg').html()+ "<p>內(nèi)層span元素被單擊</p>"); //在msg原有內(nèi)容上追加
$('#msg').html("<p>內(nèi)層span元素被單擊</p>"); //替換原來的內(nèi)容
$('#msg').html("<p>內(nèi)層span元素被單擊</p>"); //替換原來的內(nèi)容
2016-10-18
$("input:last").focusin('慕課網(wǎng)', function(e) {
$(this).val(e.data);
})
感覺更符合習(xí)慣
$(this).val(e.data);
})
感覺更符合習(xí)慣
2016-10-18