※ 另類子視窗 ※
|
<script language="JavaScript1.2"> var dragswitch=0 var nsx function drag_dropns(name){ temp=eval(name) temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP) temp.onmousedown=gons temp.onmousemove=dragns temp.onmouseup=stopns } function gons(e){ temp.captureEvents(Event.MOUSEMOVE) nsx=e.x nsy=e.y } function dragns(e){ if (dragswitch==1){ temp.moveBy(e.x-nsx,e.y-nsy) return false } } function stopns(){ temp.releaseEvents(Event.MOUSEMOVE) } //drag drop function for IE 4+//// ///////////////////////////////// var dragapproved=false function drag_dropie(){ if (dragapproved==true){ document.all.showimage.style.pixelLeft=tempx+event.clientX-iex document.all.showimage.style.pixelTop=tempy+event.clientY-iey return false } } function initializedragie(){ iex=event.clientX iey=event.clientY tempx=showimage.style.pixelLeft tempy=showimage.style.pixelTop dragapproved=true document.onmousemove=drag_dropie } if (document.all){ document.onmouseup=new Function("dragapproved=false") } ////drag drop functions end here////// function hidebox(){ if (document.all) showimage.style.visibility="hidden" else if (document.layers) document.showimage.visibility="hide" } </script> <center> <div id="showimage" style="position: absolute; width: 563; left: 50; top: 50; height: 46"> <div align="center"> <center> <table border="0" width="250" bgcolor="#000080" cellspacing="0" cellpadding="2"> <tr> <td width="100%" align="center" valign="middle"><table border="0" width="100%" cellspacing="0" cellpadding="0" height="36"> <tr> <td onMousedown="initializedragie()" style="cursor:hand" width="100%" align="left"><font face="新細明體" size="2"><ilayer width="100%"><layer width="100%" onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0"><strong><font color="#FFFFFF">http://powerpc.24cc.com</font></strong></layer></ilayer></font></td> <td style="cursor:hand"><a href="#" onClick="hidebox();return false"><font size="2"><img src="close.gif" width="16" height="14" border=0></font></a></td> </tr> <tr> <td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2" align="left"> <a href="power-1.htm"><font face="新細明體">歡迎光臨動力資訊網</font></a> </td> </tr> </table> </td> </tr> </table> </div> </div> |