為什么這樣寫就不能用了
?$("button:first").click(function(bottonName) {
? ? ? ? bottonName = bottonName || 'first';
? ? ? ? update($("span:first"),$("span:last"),bottonName);
? ? });
?$("button:first").click(function(bottonName) {
? ? ? ? bottonName = bottonName || 'first';
? ? ? ? update($("span:first"),$("span:last"),bottonName);
? ? });
2017-04-12
舉報(bào)
2017-04-12
第一個(gè)參數(shù)是事件,在JQ文檔可以查的到,所以bottomName一定要寫在第二個(gè)參數(shù)上