如何将字符串分成新行

时间:2015-11-02 14:47:58

标签: html twitter-bootstrap

我正在尝试将此行"Add Problem Report \n Add Maintenance Report \n Add Expeses Report \n Add Contract"中的字符串分隔为新行。我试过br,pre和\ n但是id不起作用。

HTML

 <input name="add" value="1" type="checkbox"  /> Add Contents  <a href="#" data-content="Add Problem Report Add Maintenance Report <br> Add Expeses Report <br>Add Contract"
 <span class="glyphicon glyphicon-info-sign" id="add_inf">
</span></a>

2 个答案:

答案 0 :(得分:0)

写:

<a href = "#"> Add Problem Report Add Maintenance Report <br> Add Expeses Report <br>Add Contract </a>

答案 1 :(得分:0)

使用实体代码&#013;

<a href="#" data-content="Add Problem Report Add Maintenance Report&#013;Add Expeses Report&#013;Add Contract">