对话框手册 - HT for Web JavaScript function alertDialog(callback, content = '确定操作?', title = '提示') { var dialog = new ht.widget.Dialog(); var buttons = []; buttons.push({ label: '取消', action: function action() { dialog.hide(); } }, { label: '确定', action: function action() { callback() dialog.hide() } }); dialog.setConfig({ title: title, draggable: true, width: 240, height: 120, contentPadding: 10, content: content, contentColor: '#ffff', buttons: buttons, buttonsAlign: 'right', // color: 'white' }); dialog.show(); } JavaScript function() { alertDialog(()=>{ window.appNotifier.fire({ kind: 'appInvoke', para: { type: 'clickData', data: '账户' } }); },'<p style="color:white">退出登录?<p>') //看这里,输入的是html div }