作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何在 toastr 中显示多行错误消息?
我已经格式化了我的错误消息,如下所示
"Please fix the following: \r\nFirst Name is required\r\nLast Name is required\r\nEmail Address is required\r\n"
最佳答案
正如Dr.Stitch所说,toastr使用字符串作为html,因此我们必须在新行中添加:
Please fix the following: </br>First Name is required</br>Last Name is required</br>Email Address is required</br>
-更新:2020年12月15日:
toastr.success('Please fix the following: </br>First Name is required</br>Last Name is required</br>Email Address is required</br>', '', { closeButton: true, timeOut: 4000, progressBar: true, allowHtml: true });
这将工作!感谢您的帮助。
关于toastr - 如何在 toastr 中显示多行消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36908445/
我是一名优秀的程序员,十分优秀!