<div class="codetitle"> <span><a style="CURSOR: pointer" data="99847" class="copybut" id="copybut99847" onclick="doCopy('code99847')"><u>复aze代码</u></a></span> 代码如下:</div> <div class="codebody" id="code99847"> <br>// JavaScript 문서 <br>var dv; <br>var dvMsg; <br>function customalert() <br>{ <br><br>dvMsg = document.createElement("div"); <br>dvMsg.style.position = "절대"; <br>dvMsg.setAttribute('id', 'msg'); <br>dvMsg.style.width = "600px"; <br>dvMsg.style.padding = "10 0 2 0"; <br>dvMsg.style.height = "313px"; <br>dvMsg.style.Background = "#EF621D"; <br>dvMsg.style.border = "1px 솔리드 #6699dd"; <br>dvMsg.style.zIndex = "1112"; <br>document.body.appendChild(dvMsg); <br>document.getElementById("msg").style.top = document.documentElement.scrollTop (document.documentElement.clientHeight - document.getElementById("msg").offsetHeight)/2 "px"; <br>document.getElementById("msg").style.left = document.documentElement.scrollLeft (document.documentElement.clientWidth - document.getElementById("msg").offsetWidth)/2 "px"; <br>var imgs = document.createElement("div"); <br>imgs.setAttribute("id", "pic"); <br>imgs.title = "닫기"; <br>imgs.style.float = "왼쪽"; <br>imgs.style.height = "20px"; <br>imgs.innerHTML = "<a href="http://www.jb51.net" target="_blank"><img src="../javascript/close.gif"/>< ;/a>"; <br>imgs.style.color = "#FFF"; <br>imgs.style.textAlign = "오른쪽"; <br>imgs.style.cursor = "포인터"; <br>imgs.style.zIndex = "1114"; <br>imgs.onclick = function() <br>{ <br>document.body.removeChild(dvMsg); <br>document.body.removeChild(dv); <br>} <br><br>document.getElementById("msg").appendChild(imgs); <br>var divstr = document.createElement("div"); <br>divstr.setAttribute("id", "info"); <br>divstr.style.left = "0"; <br>divstr.style.position = "절대"; <br>divstr.style.marginTop = "10px"; <br>divstr.style.zIndex = "1115"; <br>divstr.innerHTML = "<embed src="gallery/header2.swf"pluginspage="http://www.macromedia.com/shockwave/download /" width="600" height="313"> </삽입>"; <br>document.getElementById("msg").appendChild(divstr); <br>} <br><br>function scrolldivs() <br>{ <br>document.getElementById("msg").style.top=document.documentElement.scrollTop (document.documentElement.clientHeight-document.getElementById( "msg").offsetHeight)/2 "px"; <br>document.getElementById("msg").style.left=document.documentElement.scrollLeft (document.documentElement.clientWidth-document.getElementById("msg").offsetWidth)/2 "px"; <br>} <br><br>window.attachEvent("onresize",scrolldivs); <br>window.onscroll=scrolldivs; <br>window.onload=scrolldivs;<br> </div>