我正在使用这个
<a href="#" title="选择 1:这个 2:那个"> 点击这里 </a>
当有人悬停在上面时,我看到所有的文本都在一行中。
有没有办法让它显示在新行上?
我正在使用这个
<a href="#" title="选择 1:这个 2:那个"> 点击这里 </a>
当有人悬停在上面时,我看到所有的文本都在一行中。
有没有办法让它显示在新行上?
你可以使用 
或者 

。
<a href="#" title="select from 1: this 
 2: that" >Click here</a>
<a href="#" title="select from 1: this 
 2: that" >Click here</a>
版本 68.0.3440.106(官方构建)(64 位)
上无法工作。 - RajnishCoder
和

都对我有效。 - Flimm
。 - datalifenyc0
看起来像是八进制,但它们不是吗? - Dee$("td").attr("title", "One \n Two \n Three");
$("td").html("One <br/> Two \n <br/>Three <br/>");
$("td").append("One \n Two \n Three");
$("td").append("<br/>One <br/> Two \n Three");
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<table>
<tbody>
<tr>
<td></td>
</tr>
<tbody>
</table>
这是使用Jquery框架。
<a href="#" title="select from
1: this
2: that" >Click here</a>
echo '<a title="one\ntwo">';
。如果你要从数据库中打印内容,请记得使用适当的转义,使用 htmlspecialchars
函数。 - Flimm
。 - bryc