<div class="codetitle"> <span><a style="CURSOR: pointer" data="1317" class="copybut" id="copybut1317" onclick="doCopy('code1317')"><u>复제대码</u></a></span> 代码如下:</div> <div class="codebody" id="code1317"> <br><!--内容层--> <br><div id="ShopConfirmLayer" style="position:absolute;top:300px;left:100px;z-index:900;border:1px red solid;width:500px;display:none;"> <br><input name="button1" value="关闭" type="button" onclick="CloseShopConfirm()"/> <br></div> <br><!--覆盖层--> <br><div id="webBgLayer" 스타일="위치:absolute;top:0px;왼쪽:0px;z-index:899;배경-색상:#ccc;높이:100%;너비:100%;디스플레이 :none;-moz-opacity:0.5;filter:alpha(opacity=50);"></div> <br><script type="text/javascript"> <br>function ShopConfirm(str){ <br>var ShopConfirmLayer=document.getElementById("ShopConfirmLayer"); <br>var webBgLayer=document.getElementById("webBgLayer"); <br>ShopConfirmLayer.innerHTML=str; <br>ShopConfirmLayer.style.display=""; <br>ShopConfirmLayer.style.left=parseInt((document.documentElement.scrollWidth-ShopConfirmLayer.offsetWidth)/2) document.documentElement.scrollLeft "px"; <br>ShopConfirmLayer.style.top=Math.abs(parseInt((document.documentElement.clientHeight-ShopConfirmLayer.offsetHeight)/2)) document.documentElement.scrollTop "px"; <br>webBgLayer.style.display=""; <br>webBgLayer.style.height=document.documentElement.scrollHeight "px"; <br>} <br>function CloseShopConfirm(){ <br>var ShopConfirmLayer=document.getElementById("ShopConfirmLayer"); <br>var webBgLayer=document.getElementById("webBgLayer"); <br>ShopConfirmLayer.style.display="없음"; <br>webBgLayer.style.display="없음"; <br>} <br></script> <br> </div> <br>注의상상면적 代码头부DTD应该是这样: <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="79291" class="copybut" id="copybut79291" onclick="doCopy('code79291')"><u>复主代码</u></a></span> 代码如下:</div> <div class="codebody" id="code79291"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional. dtd"> <br><html xmlns="http://www.w3.org/1999/xhtml"> <br> </div> <br><div class="htmlarea"> <textarea id="runcode9603"> <title>제목 없음</title> fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf <input name="button2" onclick="ShopConfirm('fdsaf')" value="点我" type="button"> fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf <input name="button" onclick="ShopConfirm('fdsaf')" value="点我" type="button"> <!--内容层--> <div id="ShopConfirmLayer" style="position:absolute;top:300px;left:100px;z-index:900;border:1px red solid;width:500px;display:none;"> fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf fdasfsdfadf <input name="button1" value="关闭" type="button" onclick="CloseShopConfirm()"> </div> <!--覆盖层--> <div id="webBgLayer" style="position:absolute;top:0px;left:0px;z-index:899;background-color:#ccc;height:100%;width:100%;display:none;-moz-opacity:0.5;filter:alpha(opacity=50);"></div> </textarea> <br><input onclick="runEx('runcode9603')" type="button" value="运行代码"><input onclick="doCopy('runcode9603')" type="button" value="复制代码"> <input onclick="doSave(runcode9603)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A 전체选 注:</a>如需引入외부Js需刷新才能执行</div>]<script type="text/javascript"> function ShopConfirm(str){ var ShopConfirmLayer=document.getElementById("ShopConfirmLayer"); var webBgLayer=document.getElementById("webBgLayer"); // ShopConfirmLayer.innerHTML=str; ShopConfirmLayer.style.display=""; ShopConfirmLayer.style.left=parseInt((document.documentElement.scrollWidth-ShopConfirmLayer.offsetWidth)/2)+document.documentElement.scrollLeft+"px"; ShopConfirmLayer.style.top=Math.abs(parseInt((document.documentElement.clientHeight-ShopConfirmLayer.offsetHeight)/2))+document.documentElement.scrollTop+"px"; webBgLayer.style.display=""; webBgLayer.style.height=document.documentElement.scrollHeight+"px"; } function CloseShopConfirm(){ var ShopConfirmLayer=document.getElementById("ShopConfirmLayer"); var webBgLayer=document.getElementById("webBgLayer"); ShopConfirmLayer.style.display="none"; webBgLayer.style.display="none"; } </script>