admin管理员组文章数量:1432449
How to change line in Ext.MessageBox message?
if (duplicatedRecords.length > 0) {
var msg = '';
duplicatedRecords.forEach(function(element) {
msg += ' - ' + element.get('ClientName') + '\n';
});
Ext.MessageBox.show(
{
title: 'Record(s) already exists',
msg: msg,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK,
closable: false
});
}
I've tried with '\n' and doesn't work...
How to change line in Ext.MessageBox message?
if (duplicatedRecords.length > 0) {
var msg = '';
duplicatedRecords.forEach(function(element) {
msg += ' - ' + element.get('ClientName') + '\n';
});
Ext.MessageBox.show(
{
title: 'Record(s) already exists',
msg: msg,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK,
closable: false
});
}
I've tried with '\n' and doesn't work...
Share Improve this question asked Sep 19, 2014 at 16:08 Joao AguasJoao Aguas 501 silver badge8 bronze badges 1-
In the dialog image, it looks like you're using
/n
instead of\n
. Is the framework you're using changing them or something? – APerson Commented Sep 19, 2014 at 16:10
2 Answers
Reset to default 6This is rendering HTML, so you can just add a 'br':
Sencha fiddle
Ext.MessageBox.show(
{
title: 'Record(s) already exists',
msg: "msg<br/>msg",
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK,
closable: false
});
Message is just and HTML, so you can use <br>
if you want to do it manually.
If your text is big it will automatically wrap your text.
本文标签: javascriptHow to change line in ExtMessageBox messageStack Overflow
版权声明:本文标题:javascript - How to change line in Ext.MessageBox message? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745580443a2664589.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论