普通提示消息框:服務器
Ext.Msg.alert(title, msg, fn);
具備按鈕的提示框:url
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);
具備輸入框的提示框:code
Ext.Msg.prompt('Name', 'Please enter your name:', function(text) { // process text value and close... });