换行符在< td title ="">

问题描述:


可能存在重复:


$使用回车在HTML-tooltip> b

$ b

我想知道在使用TD的title属性时是否可以在工具提示中强制显示换行符。
类似于

I'd like to know if it's possible to force a newline to show in the tooltip when using title property of a TD. something like

<td title="lineone \n linetwo \n etc...">

可以这样做吗?

Can this be done?

现在应该可以与Internet Explorer,Firefox v12 +和Chrome 28 +一起使用了。

This should now work with Internet Explorer, Firefox v12+ and Chrome 28+

<img src="'../images/foo.gif'" 
  alt="line 1&#013;line 2" title="line 1&#013;line 2">

尝试JavaScript工具提示库以获得更好的结果,例如 OverLib

Try a JavaScript tooltip library for a better result, something like OverLib.