这样可以吗?
<html>
<head>
<title> New Document </title>
<script language="JavaScript">
<!--
function showDiv()
{
   faceimg.style.display = "";
   faceimg.style.top = window.event.x;
   faceimg.style.left = window.event.y;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" onclick="faceimg.style.display = "none";">
<img src="http://expert.csdn.net/images/csdn.gif" width="50" height="50" border=0 alt="" onmouseover="showDiv()" >
<div id="faceimg" style="position:absolute;display:none;border:1px solid red;width:100px">
<span><a href="#">详细资料</a></span><br>
<span><a href="#">详细资料</a></span><br>
<span><a href="#">详细资料</a></span>
</div>
</body>
</html>

解决方案 »

  1.   

    <HTML><HEAD><TITLE>&Icirc;&THORN;±ê&Igrave;&acirc;&Icirc;&Auml;&micro;&micro;</TITLE><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"><META HTTP-EQUIV="Content-Language" CONTENT="zh-cn">
    <style type="text/css">BODY, TD { FONT-SIZE:9pt; FONT-FAMILY:"&Euml;&Icirc;&Igrave;&aring;"; TEXT-DECORATION: none;}</style>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function OnCQQ(e,uid){
       var t=e.offsetTop;
       var l=e.offsetLeft;
       while(e=e.offsetParent){
          t+=e.offsetTop;
          l+=e.offsetLeft;
       }
       document.getElementById("CQQ_DIV").style.left=event.x;
       document.getElementById("CQQ_DIV").style.top=event.y;
    }
    function QutCQQ(){
    if(event.toElement.tagName != "TABLE"){
    document.getElementById("CQQ_DIV").style.left=-100;
    document.getElementById("CQQ_DIV").style.top=0;
    }
    }
    function hide(){
    if(event.toElement.id == "listBody"){
    document.getElementById("CQQ_DIV").style.left=-100;
    document.getElementById("CQQ_DIV").style.top=0;
    }
    }
    //-->
    </script></HEAD><BODY text="#000000" leftmargin="6" topmargin="6">
    <div id="CQQ_DIV" style="position:absolute; width:60px; height:36px; z-index:1; left:-100px; top:0px;" onMouseOut="hide()">
    <table width="60" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" class="TABLE_TBLR_SB">
    <tr><td height="18" align="center" bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#cc0000'" onMouseOut="this.style.backgroundColor='#ffffff'">·&cent;&Euml;&Iacute;&Iuml;&ucirc;&Iuml;&cent;</td>
    </tr>
    <tr><td height="18" align="center" bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#cc0000'" onMouseOut="this.style.backgroundColor='#ffffff'">&acute;&laquo;&Euml;&Iacute;&Icirc;&Auml;&frac14;&thorn;</td>
    </tr>
    </table>
    </div>
    <table width="173" height="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#333333">
      <tr valign="top"> 
        <td width="173" colspan="4" bgcolor="#FFFFFF" style="padding-top:12px;"><table width="145" height="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666" class="TABLE_TBLR_SB">
            <tr bgcolor="#FFFFFF" style="HEIGHT:25px;BACKGROUND-IMAGE: url(../images/THE_TOP_BG_2.gif);" height="4"> 
              <td align="center" style="BORDER-BOTTOM: #7D7D7D 1px solid;text-align:center;width:40px;">&sup2;&iquest;&Atilde;&Aring;:</td>
              <td align="center" style="BORDER-BOTTOM: #7D7D7D 1px solid;"><select name="select" style="width:100px;BORDER: #000000 1px solid;">
                <option value="1" selected>&Egrave;&laquo;&sup2;&iquest;</option>
                <option value="2">°ì&sup1;&laquo;&Ecirc;&Ograve;</option>
                <option value="3">&sup1;¤&sup3;&Igrave;&sup2;&iquest;</option>
                <option value="4">&frac14;&frac14;&Ecirc;&otilde;&sup2;&iquest;</option>
              </select></td>
            </tr>
            <tr bgcolor="#FFFFFF"> 
              <td id=listBody colspan="2" valign="top" style="padding-top:8px;padding-left:24px;line-height:180%;">
      <span onclick="OnCQQ(this,'12');" onMouseOut="QutCQQ();" title="&ETH;&Otilde;&Atilde;&ucirc;&pound;&ordm;&Aacute;&otilde;&frac12;¨&Atilde;&ntilde; &#13;&sup2;&iquest;&Atilde;&Aring;&pound;&ordm;&Egrave;í&frac14;&thorn;&sup2;&iquest; &#13;&micro;±&Ccedil;°&Icirc;&raquo;&Ouml;&Atilde;&pound;&ordm;&Ecirc;&Acirc;&Icirc;&ntilde;&frac12;&raquo;°ì &#13;&Ocirc;&Uacute;&Iuml;&szlig;&Ccedil;é&iquest;&ouml;&pound;&ordm;&Ocirc;&Uacute;&Iuml;&szlig;"><img src="../images/REN.gif" width="16" height="16">&Otilde;&Aring;&Egrave;&yacute;&para;&laquo;</span><br>
      <span onclick="OnCQQ(this,'12');" onMouseOut="QutCQQ();" title="&ETH;&Otilde;&Atilde;&ucirc;&pound;&ordm;&Egrave;&Icirc;&Euml;&frac34;&raquo;ú &#13;&sup2;&iquest;&Atilde;&Aring;&pound;&ordm;&Egrave;í&frac14;&thorn;&sup2;&iquest; &#13;×&icirc;&ordm;ó&Icirc;&raquo;&Ouml;&Atilde;&pound;&ordm;&acute;&yacute;°ì&Ecirc;&Acirc;&Ograve;&Euml; &#13;&Ocirc;&Uacute;&Iuml;&szlig;&Ccedil;é&iquest;&ouml;&pound;&ordm;&Agrave;&euml;&Iuml;&szlig;" CLASS="SYS_CQQ"><img src="../images/REN.gif" width="16" height="16">&Agrave;&icirc;&Euml;&Auml;</span><br>
      <span onclick="OnCQQ(this,'12');" onMouseOut="QutCQQ();" title="&ETH;&Otilde;&Atilde;&ucirc;&pound;&ordm;&Egrave;&Icirc;&Euml;&frac34;&raquo;ú &#13;&sup2;&iquest;&Atilde;&Aring;&pound;&ordm;&Egrave;í&frac14;&thorn;&sup2;&iquest; &#13;×&icirc;&ordm;ó&Icirc;&raquo;&Ouml;&Atilde;&pound;&ordm;&acute;&yacute;°ì&Ecirc;&Acirc;&Ograve;&Euml; &#13;&Ocirc;&Uacute;&Iuml;&szlig;&Ccedil;é&iquest;&ouml;&pound;&ordm;&Agrave;&euml;&Iuml;&szlig;" CLASS="SYS_CQQ"><img src="../images/REN.gif" width="16" height="16">&Egrave;&Icirc;&Euml;&frac34;</span>&raquo;ú<br>
      </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    <table width="100" border="0" cellspacing="0" cellpadding="0">
      <tr height="6"> 
        <td height="6"></td>
      </tr>
    </table>
    </BODY>
    </HTML>
      

  2.   

    <HTML><HEAD><TITLE>无标题文档</TITLE><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"><META HTTP-EQUIV="Content-Language" CONTENT="zh-cn">
    <style type="text/css">BODY, TD { FONT-SIZE:9pt; FONT-FAMILY:"宋体"; TEXT-DECORATION: none;}</style>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function OnCQQ(e,uid){
       var t=e.offsetTop;
       var l=e.offsetLeft;
       while(e=e.offsetParent){
          t+=e.offsetTop;
          l+=e.offsetLeft;
       }
       document.getElementById("CQQ_DIV").style.left=event.x;
       document.getElementById("CQQ_DIV").style.top=event.y;
    }
    function QutCQQ(){
    if(event.toElement.tagName != "TABLE"){
    document.getElementById("CQQ_DIV").style.left=-100;
    document.getElementById("CQQ_DIV").style.top=0;
    }
    }
    function hide(){
    if(event.toElement.id == "listBody"){
    document.getElementById("CQQ_DIV").style.left=-100;
    document.getElementById("CQQ_DIV").style.top=0;
    }
    }
    //-->
    </script></HEAD><BODY text="#000000" leftmargin="6" topmargin="6">
    <div id="CQQ_DIV" style="position:absolute; width:60px; height:36px; z-index:1; left:-100px; top:0px;" onMouseOut="hide()">
    <table width="60" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" class="TABLE_TBLR_SB">
    <tr><td height="18" align="center" bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#cc0000'" onMouseOut="this.style.backgroundColor='#ffffff'">发送消息</td>
    </tr>
    <tr><td height="18" align="center" bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#cc0000'" onMouseOut="this.style.backgroundColor='#ffffff'">传送文件</td>
    </tr>
    </table>
    </div>
    <table width="173" height="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#333333">
      <tr valign="top"> 
        <td width="173" colspan="4" bgcolor="#FFFFFF" style="padding-top:12px;"><table width="145" height="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666" class="TABLE_TBLR_SB">
            <tr bgcolor="#FFFFFF" style="HEIGHT:25px;BACKGROUND-IMAGE: url(../images/THE_TOP_BG_2.gif);" height="4"> 
              <td align="center" style="BORDER-BOTTOM: #7D7D7D 1px solid;text-align:center;width:40px;">部门:</td>
              <td align="center" style="BORDER-BOTTOM: #7D7D7D 1px solid;"><select name="select" style="width:100px;BORDER: #000000 1px solid;">
                <option value="1" selected>全部</option>
                <option value="2">办公室</option>
                <option value="3">工程部</option>
                <option value="4">技术部</option>
              </select></td>
            </tr>
            <tr bgcolor="#FFFFFF"> 
              <td id=listBody colspan="2" valign="top" style="padding-top:8px;padding-left:24px;line-height:180%;">
      <span onclick="OnCQQ(this,'12');" onMouseOut="QutCQQ();" title="姓名:刘建民 &#13;部门:软件部 &#13;当前位置:事务交办 &#13;在线情况:在线"><img src="../images/REN.gif" width="16" height="16">张三东</span><br>
      <span onclick="OnCQQ(this,'12');" onMouseOut="QutCQQ();" title="姓名:任司机 &#13;部门:软件部 &#13;最后位置:待办事宜 &#13;在线情况:离线" CLASS="SYS_CQQ"><img src="../images/REN.gif" width="16" height="16">李四</span><br>
      <span onclick="OnCQQ(this,'12');" onMouseOut="QutCQQ();" title="姓名:任司机 &#13;部门:软件部 &#13;最后位置:待办事宜 &#13;在线情况:离线" CLASS="SYS_CQQ"><img src="../images/REN.gif" width="16" height="16">任司</span>机<br>
      </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    <table width="100" border="0" cellspacing="0" cellpadding="0">
      <tr height="6"> 
        <td height="6"></td>
      </tr>
    </table>
    </BODY>
    </HTML>
      

  3.   

    gaokill在工作中用到的。
    <script language="javascript">
    var titleup_menu = null;
    document.onclick = new Function("showTitle(null)")
    function getPos(el,sProp) {
    var iPos = 0;
    while (el!=null) {
    iPos+=el["offset" + sProp];
    el = el.offsetParent;
    }
    return iPos;
    }function showTitle(el, m,title) {
    var slength = title.length; if (m) {
    //alert(getPos(el,"Left"));
    m.style.display='';
    if (getPos(el,"Left")+180 > screen.width)
    {
    m.style.pixelLeft = getPos(el,"Left") - (180-10);
    }else{
    m.style.pixelLeft = getPos(el,"Left") + el.offsetWidth;
    }
    m.style.pixelTop = getPos(el,"Top");

    m.innerHTML = '<table CELLPADDING=0 CELLSPACING=0>'+
          '<tr><td>'+title+'</td></tr>'+
          '</table>';
    }
    if ((m!=titleup_menu) && (titleup_menu)||slength == 0) titleup_menu.style.display = 'none';
    titleup_menu = m;
    }function hideTitle(el, m) {
    if (el && m && m.style.display=='') {
    if ((document.body.scrollLeft + window.event.x > el.offsetLeft) 
    && (document.body.scrollLeft + window.event.x < el.offsetLeft + el.offsetWidth) 
    && (document.body.scrollTop + window.event.y > el.offsetTop) 
    && (document.body.scrollTop + window.event.y < el.offsetTop + el.offsetHeight)
    || (document.body.scrollLeft + window.event.x > m.offsetLeft)                
    && (document.body.scrollLeft + window.event.x < m.offsetLeft + m.offsetWidth) 
    && (document.body.scrollTop + window.event.y > m.offsetTop)
    && (document.body.scrollTop + window.event.y < m.offsetTop + m.offsetHeight)) {
    } else {
    m.style.display = 'none';
    }
    }
    }function hideSelf(m) {
    if (m.style.display=='') {
    if ((document.body.scrollLeft + window.event.x >= m.offsetLeft)                
    && (document.body.scrollLeft + window.event.x <= m.offsetLeft + m.offsetWidth) 
    && (document.body.scrollTop + window.event.y >= m.offsetTop)
    && (document.body.scrollTop + window.event.y <= m.offsetTop + m.offsetHeight)) {
    } else {
    m.style.display = 'none';
    }
    }
    }
    //-->
    </script>
    <!--鼠标移动到用户名上出现的菜单---开始----------------------------------------->
    <STYLE>.popmenu {
    BORDER-RIGHT: #3c3a6c 1px solid; BORDER-TOP: #3c3a6c 1px solid; BORDER-LEFT: #3c3a6c 1px solid; LINE-HEIGHT: 18px; BORDER-BOTTOM: #3c3a6c 1px solid; POSITION: absolute; BACKGROUND-COLOR: #f4f6fc
    }
    </STYLE>
    <SCRIPT src="/admin/js/popupmenu.js"></SCRIPT>
    <DIV class=popmenu id=titleMenu style="DISPLAY: none" onmouseout=hideSelf(this)></DIV>
    <!--鼠标移动到用户名上出现的菜单---结束------------------------------------------->
    <!--这是我用到的事件响应,移到图片上出现内容提示-->
    <td ><div align="center"><image src="<%=simplePicPath%>" width=100 height=100 border="0" onmouseover="showTitle(this, titleMenu,'<%=simpleContent%>')"
                onmouseout="hideTitle(this, titleMenu)"></div></td>