<div id="win" style="padding: 5px" modal=true draggable=false class="easyui-dialog" closed=true data-options=" buttons:[{ text:'save', },{ text:'close', }]">
2. js file method;
//buttons text value! $.extend($.fn.dialog.methods, { bindButtonEvents: function (jq, param) { return jq.each(function () { var dialog = $(this); dialog.parent().on('click', '.dialog-button a', function (e) { var text = $(this).linkbutton('options').text; var method = param[text]; if (method) { method(); } }); }); } }); //dialog button method $('#win').dialog('bindButtonEvents', { save: function () { console.log('hellolllllll') }, close: function () { console.log('close..............') } });