以下为引用的内容: <HTML> <head> <Meta http-equiv="Content-Type" content="text/HTML; charset=gb2312" /> <Title>跟随鼠标的层 - 建站学院</Title> <script type="text/JavaScript"> function show_mp() { var obj=document.getElementByID(’mpdiv’); var L=T=0; var divWIDth=220; var divHeight=70; var padding=15; var R= document.body.scrollleft+document.body.clIEntWIDth-divWIDth; var B = document.body.scrolltop+document.body.clIEntHeight-divHeight; var x=document.body.scrollleft+event.clIEntX; var y=document.body.scrolltop+event.clIEntY;
obj.style.display="none"; if (x < L) { x = x+divWIDth;} if (x > R){ x = x-divWIDth-padding*2;} if (y < T) { y = T+divHeigh; } if (y > B) { y = B-padding*2; } obj.style.left=x+padding; obj.style.top=y+padding; obj.style.display=""; } function hIDden_mp() { var obj=document.getElementByID(’mpdiv’); obj.style.display="none"; } </script> </head> <body> <a href="#" onMouSEOver="show_mp()" onMouSEOut="hIDden_mp()">afasdfds</a> <div ID="mpdiv" style='wIDth: 220px; overflow: hIDden; position:absolute; z-index:5; display:none;'> <table wIDth="220" border="0" cellpadding="0" cellspacing="1" bgcolor="#fc9c0a"> <tr> <td height="70" valign="top" bgcolor="#ffffff" style='padding:5px;'></td> </tr> </table> </div> </body> </HTML>
评论列表(0条)