js +css 執行個體拖動層代碼

來源:互聯網
上載者:User

js

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無標題文檔</title>
<SCRIPT language=JavaScript>
<!--
function JM_cc(ob){
var obj=MM_findObj(ob); if (obj) {
obj.select();js=obj.createTextRange();js.execCommand("Copy");}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
//-->
</SCRIPT>

<SCRIPT>  
var over=false,down=false,divleft,divtop,n;  
function clase(x){document.all['plane'+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>

<META content="MSHTML 5.00.2920.0" name=GENERATOR></HEAD>
<BODY bgColor=#000000 onmousemove=move() onmouseup=down=false>
<DIV class=aa id=plane1 onmousedown=down1(this)
style="CURSOR: move; HEIGHT: 102px; LEFT: 6px; POSITION: absolute; TOP: 27px; WIDTH: 131px; Z-INDEX: 1">
<TABLE bgColor=#000000 border=0 cellPadding=0 cellSpacing=0 height=100
width=130>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff height=18 width=131>
      <DIV align=right><FONT color=#666666 face=Verdana size=2><A
      href="#"
      onclick=clase(1)><IMG border=0 height=9
      src="yun_qi_img/12493942650.gif"
width=9></A> </FONT></DIV></TD></TR>
  <TR>
    <TD align=middle bgColor=#a02058 vAlign=top width=131>
      <P><FONT color=#666666 face=Verdana size=2><BR> </FONT></P></TD></TR></TBODY></TABLE></DIV>
<DIV class=aa id=plane2 onmousedown=down1(this)
style="CURSOR: move; HEIGHT: 100px; LEFT: 6px; POSITION: absolute; TOP: 139px; WIDTH: 131px; Z-INDEX: 2">
<TABLE bgColor=#000000 border=0 cellPadding=0 cellSpacing=0 height=100
width=130>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff height=18 width=130>
      <DIV align=right><FONT color=#666666 face=Verdana size=2><A
      href="#"
      onclick=clase(2)><IMG border=0 height=9
      src="/down/js/images/12493942650.gif"
width=9></A> </FONT></DIV></TD></TR>
  <TR>
    <TD align=middle bgColor=#a02058 vAlign=top width=130>
      <P><FONT color=#666666 face=Verdana size=2><BR> </FONT></P></TD></TR></TBODY></TABLE></DIV>
<DIV class=aa id=plane3 onmousedown=down1(this)
style="CURSOR: move; HEIGHT: 101px; LEFT: 6px; POSITION: absolute; TOP: 248px; WIDTH: 131px; Z-INDEX: 2">
<TABLE bgColor=#000000 border=0 cellPadding=0 cellSpacing=0 height=100
width=130>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff height=18 width=130>
      <DIV align=right><FONT color=#666666 face=Verdana size=2><A
      href="#"
      onclick=clase(3)><IMG border=0 height=9
      src="/down/js/images/12493942650.gif"
width=9></A> </FONT></DIV></TD></TR>
  <TR>
    <TD align=middle bgColor=#a02058 vAlign=top width=130>
      <P><FONT color=#666666 face=Verdana size=2><BR>
      </FONT></P>
      <P></P></TD></TR></TBODY></TABLE></DIV>
<p>尋找更多代碼,請訪問:<a href="http://www.111cn.net" target="_blank">中國WEB第一站</a></p>
</BODY></HTML>

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.