click事件(function(event, bottonName)里面的bottonName參數(shù)和updata函數(shù)里面的bottonName參數(shù)有關(guān)系嗎?
$("button:first").click(function(event, bottonName) {
? ? ? ? ? ? bottonName = bottonName || 'first';
? ? ? ? ? ? update($("span:first"), $("span:last"), bottonName);
? ? ? ? });
這里面的每一行的bottonName是指什么?
2020-04-28
bottonName是形參,從function(event,bottonName) 傳遞到?update($("span:first"), $("span:last"), bottonName);