<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" style="position:absolute;top:0px;left:0px;z-index:899;background-color:#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="none"; <br>webBgLayer.style.display="none"; <br>} <br></script> <br><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>