我试过使用:$(this).add(“button”);
var mydialog = ... result of jqueryui .dialog() var buttons = mydialog.dialog("option","buttons"); // getter $.extend(buttons,{ foo: function () { alert('foo'); } }); mydialog.dialog("option","buttons",buttons); // setter