日期:2014-05-19  浏览次数:20408 次

如何实现鼠标一放出现提示,但提示是要显示两行的?
<body   MS_POSITIONING= "GridLayout ">
<form   id= "Form1 "   method= "post "   runat= "server ">
<a   href= "# "   onmouseover= "   r_onmouseover() "   onmouseout= "   r_onmouseout() "> <%#   DataBinder.Eval(Container.DataItem, "title ")%> </a>
<div   id= "tip "
&nbsp;&nbsp;&nbsp;第一行: <%#   DataBinder.Eval(Container.DataItem, "title ")%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;第二行: <%#   DataBinder.Eval(Container.DataItem, "title ")%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<script   language= "javascript ">
function   r_onmouseover()   {
    tip.style.left   =   event.x;
    tip.style.top   =   event.y   +   20;
    setTimeout(function(){
        tip.style.display   =   " ";
    },100);
}

function   r_onmouseout()   {
    setTimeout(function(){
        tip.style.display   =   "none ";
    },20);
} </script>
</form>
</body>
要如何显示呢?我上面的出错了

------解决方案--------------------
<a href= " " title= "a&#13;b "> test </a>
------解决方案--------------------
用js。当鼠标经过的时候,显示一个层 < div> 这样的话,别说是两行,就是N行都没问题
==============================================================================
.net技术交流群 QQ8793209 欢迎职业程序员加入