mar*_*maf 3 newline ruby-on-rails
我想在警报框中有两行
现在我有以下内容:
<%= link_to 'back', 'history.back()', :confirm => 'Are you sure? This is my second line' %>
Run Code Online (Sandbox Code Playgroud)
我尝试添加'\n'但它不起作用,它只是在我的文本之间写入\n.我该怎么办?
先感谢您
小智 11
我认为你的确认文本周围的单引号会导致\n
字面上的解释.试试这个:
<%= link_to 'back', 'history.back()', :confirm => "Are you sure? \n This is my second line" %>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2483 次 |
最近记录: |