如何在toastr中显示多行错误信息?
我已经格式化了如下所示的错误消息
"Please fix the following: \r\nFirst Name is required\r\nLast Name is required\r\nEmail Address is required\r\n"
Run Code Online (Sandbox Code Playgroud)
但在toasrt中它显示在单行中.请帮忙
Tri*_*hak 11
正如Dr.Stitch所说,toastr使用字符串作为html,所以我们必须为新行添加:
Please fix the following: </br>First Name is required</br>Last Name is required</br>Email Address is required</br>
Run Code Online (Sandbox Code Playgroud)
这会工作!!! 感谢您的帮助.
小智 11
allowHtml:true
toastr.success('\'Second Review\' validation has started. </br>All SME\'s and Reviewers will get an email notification', '', { closeButton: true, timeOut: 4000, progressBar: true, allowHtml: true });
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
9730 次 |
最近记录: |