2015-11-02 43 views
1

我想將此行中的字符串"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> 
+0

您可能需要逃避你的字符串你這話是什麼呢? –

回答

0

寫:

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

這根本行不通,字符串必須在'data-content =「這裏」,我這樣做是爲了顯示一些信息鼠標輸入事件並將其隱藏在鼠標離開事件中 – Saif

0

使用實體代碼&#013;

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

它沒有將字符串分隔成新的線路 – Saif

相關問題