我的意思是像csdn结贴时,鼠标移到分数框时显示的层,只是把层的内容改为我需要的表格。

解决方案 »

  1.   

    div的innerHTML就可以了,非常简单
      

  2.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>鼠?提示</title>
    <script language="JavaScript">
    function seashowtip(tips,flag,iwidth){
    var my_tips=document.all.mytips;
    if(flag){
        my_tips.innerHTML=document.getElementsByTagName(tips).item(0).outerHTML;
        my_tips.style.display="";
        my_tips.style.width=iwidth;
        my_tips.style.left=event.clientX+10+document.body.scrollLeft;
        my_tips.style.top=event.clientY+10+document.body.scrollTop;
       }
    else 
      {
       my_tips.style.display="none";
       }
    }
    function NoneDisplay(){var my_tips=document.all.mytips;
    my_tips.style.display= "none";
    }
    </script>
    <div id=mytips style="position:absolute;background-color:#ffffff;width:121;height:16;border:1px solid gray;display:none;filter: progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3); left:0; top:5"></div>
    </head>
    <body>
    <table name="table1" class="33232">
    <tr>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">A</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">B</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">C</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">D</td>
    </tr>
    <tr>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">A</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">B</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">C</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">D</td>
    </tr>
    <tr>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">A</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">B</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">C</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">D</td>
    </tr>
    <tr>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">A</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">B</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">C</td>
    <td onmouseover="seashowtip('table',1,30)" onmouseout="NoneDisplay()">D</td>
    </tr>
    </table>
    </body>
    </html>