Extjs 在Ext js表单的按钮单击上显示不同的消息

Extjs 在Ext js表单的按钮单击上显示不同的消息,extjs,extjs3,Extjs,Extjs3,我正在使用ExtJS开发一个表单。我增加了按钮。单击save按钮,它显示请求确认的消息,有两个按钮ok和save。但我不知道如何为这两个不同的按钮提供不同的信息。这是我的密码 buttons: [ { text: 'Save', handler:function() { Ext.Msg.show({ title:'Confirmation', msg: 'Press OK if u want to Contine otherwis

我正在使用ExtJS开发一个表单。我增加了按钮。单击save按钮,它显示请求确认的消息,有两个按钮ok和save。但我不知道如何为这两个不同的按钮提供不同的信息。这是我的密码

 buttons: [
 {

   text: 'Save',
   handler:function()
   {
       Ext.Msg.show({
       title:'Confirmation',
       msg: 'Press OK if u want to Contine otherwise Press Cancel to Exit',
       buttons: Ext.Msg.OKCANCEL
       //There are buttons added
    }); 
   }   
 }, 
 }]

您可以创建messagebox组件并根据需要对其进行配置,而不是ext.Msg.show

var messageBox = new Ext.MessageBox({
            buttonText: {
                ok : 'other Ok',
                cancel: 'other cancel'
            }
        });
然后显示组件

messageBox.show({
       title:'Confirmation',
       msg: 'Press OK if u want to Contine otherwise Press Cancel to Exit',
       buttons: Ext.Msg.OKCANCEL
       //There are buttons added
    }); 

请注意,按钮id仍然可以,但会取消。

您使用的是什么版本的extjs?