JavaScript function alertDialog(callback, content = '确定操作?', title = '提示') { var S = hteditor.getString; var dialog = new ht.widget.Dialog(); var buttons = []; buttons.push({ label: S('Cancel'), action: function action() { dialog.hide(); } }, { label: S('OK'), action: function action() { callback() dialog.hide() } }); dialog.setConfig({ title: S(title), draggable: true, width: 240, height: 120, contentPadding: 10, content: content, buttons: buttons, buttonsAlign: 'right', // color: '#000' }); dialog.show(); }