<div class="codetitle"> <span><a style="CURSOR: pointer" data="82918" class="copybut" id="copybut82918" onclick="doCopy('code82918')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code82918"> <br><!--彈出層的顯示與隱藏--> <br><script type="text/javascript"> <BR>//彈出層的顯示<BR>//overlays:為遮罩層的ID <BR>//wins:彈出層窗體的ID <BR>/ /彈出層中用來拖曳的ID <BR>function popDIV_show(overlays,wins,wins_title) { <BR>var oLays = documentgetElementById(overlays); <BR>var oWins = documentgetElementById(overlays); <BR>var oWins = documentgetElementById(wins); = documentgetElementById(wins_title); <BR>var bDrag = false; <BR>var disX = disY = 0; <BR>var w = ""; <BR>var n = 1; <BR>if (n > 0) { <BR>oLaysstyledisplay = "block"; <BR>oWinsstyledisplay = "block"; <BR>oWins_titleonmousedown = function(event) { <BR>var event = event || windowevent <BR>; disX = eventclientX - oWinsoffsetLeft; <BR>disY = eventclientY - oWinsoffsetTop; <BR>thissetCapture && thissetCapture(); <BR>return false <BR>}; bDrag) <BR>return; <BR>var event = event || windowevent; <BR>var iL = eventclientX - disX; <BR>var iT = eventclientY - disY; <BR>var maxL = doccliuments <Elementot; ; <BR>var maxT = documentdocumentElementclientHeight <BR>- oWinsoffsetHeight; <BR>iL = iL < 0 ? 0 : iL; <BR>iL = iL > maxL ? maxL : iL; : iT; <BR>iT = iT > maxT ? maxT : iT; <BR>oWinsstylemarginTop = oWinsstylemarginLeft = 0; <BR>oWinsstyleleft = iL "px"; <recomm ; <BR>}; <BR>documentonmouseup = windowonblur = oWins_titleonlosecapture = function() { <BR>bDrag = false; <BR>oWins_titlereleaseCapture && oWins_title> <電話(); >//彈出層的隱藏<BR>//overlays:為遮罩層的ID <BR>//wins:彈出層窗體的ID <BR>function popDIV_hidden(overlays,wins) { <BR>var oWins = documentgetElementById(wins); <BR>var oLays = documentgetElementById(overlays); <BR>oWinsstyledisplay = "none"; <BR>oLaysstyledisplay = "none"; <>} <n ></script> </div>