dhl:弹出div层,可关闭可移动

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

</head>

<body>
<script>
var over=false,down=false,divleft,divtop,n;
function clase(x){
 document.all[x].style.visibility='hidden'
 }
function down1(m){
 n=m;
 down=true;
 divleft=event.clientX-parseInt(m.style.left);
 divtop=event.clientY-parseInt(m.style.top)
 }
function move(){
 if(down){
  n.style.left=event.clientX-divleft;n.style.top=event.clientY-divtop;
  }
 }
</script>

<script type="text/javascript" src="http://mypctest.googlecode.com/svn/trunk/jemu/js/jemu.js"></script>

<DIV onmouseup=down=false onmousemove=move() onmousedown=down1(this) id="DGbanner"
      style="Z-INDEX: 1; FILTER: alpha(opacity=90); LEFT: 250px; WIDTH: 405px; POSITION: absolute; TOP: 120px; HEIGHT: 200px; ">
<TABLE height=250 cellSpacing=1 cellPadding=0 width=405 bgColor=#000000 border=0>
<TR>
<TD style="CURSOR: move;background-color:#5a8ace; height:11px; text-align:right;"><A
        style="FONT-SIZE: 9pt; COLOR: #eeeeee;  TEXT-DECORATION: none; text-align:right; cursor:hand"
        onclick='clase()'>关闭</TD></TR>
<TR><TD bgColor=#f4f4f4 valign=top style="COLOR: #f4f4f4; height:210px; "><div id="dcontent" style=" font-size:14px; color:Black;"></div></TD></TR>
</TABLE>
</DIV>

</body>
</html>

原文地址:https://www.cnblogs.com/dudu837/p/1783836.html