<ptml> <pead> <title> Drag layer </title> <style> td{font-size:12px;} /* Analog Form/* vwin{Position:absolute; border-top:2px outset buttonhighlight; border-left:2px outset buttonhighlight; border-bottom:2px outset Buttonshadow; border-right:2px outset Buttonshadow; }. Vwintit{height:18px;background-color: #000099; color: #ffffff; font-weight:bold;cursor:move;} . Vwinbody{background-color: #D6D3CE;} </style> </pead> <body> <table id= "Win01" class= "Vwin" width= "" height= "" cellspacing= "0 "cellpadding=" 0 "border=" 0 "> <tr> <td class=" Vwintit "forid=" win01 "> window one </td > </tr> <tr> <td class= "Vwinbody" forid= "Win01" > </td> </tr> </table> <table id= "win02" class= "Vwin" width= "0" height= "cellspacing=" adding= "0" border= "0" > <tr> <td class= "Vwintit" forid= "win02" > window two </td> </tr> ; <tr> <td class= "Vwinbody" forid= "win02" > </td> </tr> </table> ; <table id= "win03" class= "Vwin" width= "0" height= "0" cellspacing= "0" > cellpadding= Gt <TD class= "Vwintit" forid= "win03" > Windows three </td> </tr> <tr> <TD class= "Vwinbody" forid= "win03" > </td> </tr> </table> <script>//this J Avascript was writen by Dron var md=false,mobj,ox,oy,index=1000; function Document.onmousedown () {winfocus (); if (event.srcelement.classname== "Vwintit") {MD = true; Mobj = document.getElementById (Event.srcElement.forid); Ox = mobj.offsetleft-event.x; Oy = Mobj.offSettop-event.y; } document.onmouseup=function () {Md=false} function Document.onmousemove () {if (MD) {mobj.style.left = event.x + ox; Mobj.style.top = Event.y + Oy; } function Winfocus () {Fobj=document.getelementbyid (Event.srcElement.forid); if (Fobj==null) {return false} if (Fobj.style.zindex!=index) {index = index + 1; Fobj.style.zindex=index; }} Document.onclick=winfocus; </script> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]