普通提示消息框:
Ext.Msg.alert(title, msg, fn);
具有按钮的提示框:
var msgbox = Ext.Msg.show({
title: '下载',
message: "确定要下载吗",
buttons: [{
itemId: 'ok',
cls: 'm-but-icon-03 m-margin-02 ',
text: '下载',
handler: function(button) {
var url = config.actionUrl + "downloadTopologyPic.action?filename="+name+"&username="+localStorage.username; //服务器地址
window.open(url);
msgbox.setHidden(true); //隐藏
}
}, {
itemId: 'cancle',
cls: 'm-but-icon-03 m-margin-02 ',
text: '取消',
handler: function(button) {
msgbox.setHidden(true); //隐藏
}
}],
});
msgbox.setHidden(false);
具有输入框的提示框:
Ext.Msg.prompt('Name', 'Please enter your name:', function(text) {
// process text value and close...
});