bottonName = bottonName || 'first';這里的'first'是什么?
2016-07-22
//不同函數(shù)傳遞數(shù)據(jù)
function fn(e) {
$(this).val(e.data)
}
function a() {
$("input:last").focusin('慕課網(wǎng)', fn)
}
a();
函數(shù)的傳遞過程。缺少a()不能運行出結(jié)果。
function fn(e) {
$(this).val(e.data)
}
function a() {
$("input:last").focusin('慕課網(wǎng)', fn)
}
a();
函數(shù)的傳遞過程。缺少a()不能運行出結(jié)果。
2016-07-21
一切正常,測試一里選中input框里內(nèi)容和點擊按鈕是同一個效果;選中多行文本框就彈出用鼠標選中文字。
但是我覺得應該設(shè)置成選中哪幾個字就只彈選中的那幾個字才是最好的吧。現(xiàn)在是不論選擇幾個字都是彈出所有的。
但是我覺得應該設(shè)置成選中哪幾個字就只彈選中的那幾個字才是最好的吧。現(xiàn)在是不論選擇幾個字都是彈出所有的。
2016-07-20
蛋疼。看評論都說textarea元素要有改變并且失去焦點后觸發(fā),不知道和教程哪個對,想試試。
結(jié)果js里.target3的事件怎么修改都沒用,仔細看看代碼才發(fā)現(xiàn),html里textarea的class寫成了target2!
結(jié)果js里.target3的事件怎么修改都沒用,仔細看看代碼才發(fā)現(xiàn),html里textarea的class寫成了target2!
2016-07-20
var n = 0;
//綁定事件
$(".aaron:last").on('mousedown mouseup', function(e) {
$(this).text( '觸發(fā)類型:' + (e.type) + ",次數(shù)" + n)
++n;
})
//刪除事件
$("button:last").click(function() {
$(".aaron:last").off()
})
//綁定事件
$(".aaron:last").on('mousedown mouseup', function(e) {
$(this).text( '觸發(fā)類型:' + (e.type) + ",次數(shù)" + n)
++n;
})
//刪除事件
$("button:last").click(function() {
$(".aaron:last").off()
})
2016-07-20
$("ul").on('click',function(e){
$(e.target).css('color','red')
})
$(e.target).css('color','red')
})
2016-07-18
不了解什么是冒泡事件的要先去學學"DOM事件揭秘"這個課程,學完就清楚了. 傳送門:http://idcbgp.cn/learn/138
2016-07-18