為什么這樣寫就不能用了
?$("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
舉報
2017-04-12
第一個參數是事件,在JQ文檔可以查的到,所以bottomName一定要寫在第二個參數上