<script language= "JavaScript" > <!--var currentmoveobj = null; Current Drag object var Relleft; Mouse down position relative to object position var Reltop; function F_mdown (obj) {currentmoveobj = obj; When the object is pressed, record the object currentMoveObj.style.position = "Absolute"; Relleft = Event.x-currentmoveobj.style.pixelleft; Reltop = Event.y-currentmoveobj.style.pixeltop; } window.document.onmouseup = function () {currentmoveobj = null; Release drag object at the same time when Mouse is released} function F_move (obj) {if (currentmoveobj!= null) {CURRENTMOVEOBJ.STYLE.PIXELLEF T=event.x-relleft; Currentmoveobj.style.pixeltop=event.y-reltop; }//--> </SCRIPT> <BODY> <table width= "Border=1 onselectstart=" return false "onmousedown=" F_mdown (This) "Onmousemove=" F_move (this) > <TR> <td bgcolor= "#CCCCCC" align= "center" >TITLE1</TD&G T </TR> <TR> <td align= "center" height= "a" >content</TD> </TR> </table> <table width= "Border=1 onselectstart=" return false "onmousedown=" F_mdown (This) "Onmousemove=" F_move ( This) "> <TR> <td bgcolor=" #CCCCCC "align=" center ">title2</TD> </TR> <TR> &L T TD align= "center" height= ">content</TD> </TR> </TABLE> </BODY>"
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]