$("button:last").click(function() {
$("button:first").trigger('click','last');
});我觉得是把"last"作为参数,传给了第一个按钮的click事件里面的bottonName
$("button:first").click(function(event,bottonName) {
bottonName = bottonName || 'first';
update($("span:first"),$("span:last"),bottonName);
});