简体   繁体   English

Ext.js确认方法添加新行字符

[英]Ext.js confirm method add new line character

I have a problem about Ext.MessageBox.confirm method. 我有一个关于Ext.MessageBox.confirm方法的问题。 I want to add a new line to confirm message but if i put \\n it is not work, if i put html new line br it works but br is shown in message. 我想添加新行以确认消息,但是如果我输入\\ n则行不通,如果我输入html新行br,则行得通,但br会显示在消息中。 My methot is shown below. 我的methot如下所示。 br is inside <> br在<>里面

confirm: function(message, callback) {
    this.localizeExtMessageBox();
    Ext.MessageBox.confirm(this.getLocalizedString(Ab.view.View.z_MESSAGE_CONFIRM), message, callback);
}

How can i do that, thank you. 我该怎么做,谢谢。

Try this: 尝试这个:

 Ext.MessageBox.show({
         title: 'my title',
         icon: Ext.Msg.QUESTION,
         msg: 'text here</br> other text in new line?',
         buttonText: { yes: "Yes", no: "No" },
         fn: function (btn) {
           if (btn == 'yes') {
            //your realization
           }
         }
       }
     });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM