課程
/前端開發(fā)
/jQuery
/jQuery基礎(chǔ)(三)—事件篇
first.text(bottonName)這句是什么意思
2016-05-24
源自:jQuery基礎(chǔ)(三)—事件篇 7-1
正在回答
注意這里自定義函數(shù) :?
function update(first,last,buttonName) {
? ? ? ? first.text(buttonName);
? ? ? ? var n = parseInt(last.text(), 10);
? ? ? ? last.text(n + 1);
? ? }
然后這里給我們的自定義函數(shù)傳參: update($("span:first"),$("span:last"),buttonName);
so:?first.text(buttonName) =?$("span:first").text(buttonName);
又: buttonName = buttonName || first;
這里我們并沒有給buttonName 這個參數(shù)傳值,所以 buttonName 取值為 first;
So: ?first.text(buttonName) =?$("span:first").text("first");
weibo_一萬群什麼_0
hey自然 回復(fù) weibo_一萬群什麼_0
weibo_一萬群什麼_0 回復(fù) hey自然
這句是獲取第一個<span>元素的內(nèi)容
first變量 ? .text()文本內(nèi)容 ?把bottonName ? 的值付給first
舉報
jQuery第三階段開啟事件修煉,掌握對頁面進行交互的操作
3 回答如果bottonName = bottonName,那代表什么,如果bottonName = first又是代表什么?trigger('click','last'),這個last代表什么? first.text(bottonName);這一句怎么理解?
2 回答bottonName = bottonName || 'first';什么意思啊
3 回答first.text(bottonName)怎么求出來值是多少?
3 回答bottonName是什么?_?
2 回答各位這句是什么意思啊 如何用
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-06-17
注意這里自定義函數(shù) :?
function update(first,last,buttonName) {
? ? ? ? first.text(buttonName);
? ? ? ? var n = parseInt(last.text(), 10);
? ? ? ? last.text(n + 1);
? ? }
然后這里給我們的自定義函數(shù)傳參: update($("span:first"),$("span:last"),buttonName);
so:?first.text(buttonName) =?$("span:first").text(buttonName);
又: buttonName = buttonName || first;
這里我們并沒有給buttonName 這個參數(shù)傳值,所以 buttonName 取值為 first;
So: ?first.text(buttonName) =?$("span:first").text("first");
2016-05-26
這句是獲取第一個<span>元素的內(nèi)容
2016-05-25
first變量 ? .text()文本內(nèi)容 ?把bottonName ? 的值付給first