<div class="codetitle"> <span><a style="CURSOR: pointer" data="22768" class="copybut" id="copybut22768" onclick="doCopy('code22768')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code22768"> <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><tête> <br><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <br><title>简易弹出框</title> <br><style type="text/css"> <br>.mydiv { <br>couleur de fond : #ff6 ; <br>bordure : 5px solide #f90 ; <br>text-align : centre ; <br>hauteur de ligne : 40 px ; <br>taille de police : 12 px ; <br>font-weight : gras ; <br>z-index:99; <br>largeur : 300 px ; <br>hauteur : 120px ; <br>gauche:50%;/*FF IE7*/ <br>haut: 50%;/*FF IE7*/ <br><br>marge-gauche:-150px!important;/*FF IE7 */ <br>margin-top:-60px!important;/*FF IE7 */ <br><br>margin-top:0px; <br><br>position:fixed!important;/*FF IE7*/ <br>position:absolute;/*IE6*/ <br><br>_top: expression(eval(document.compatMode && <br>document .compatMode=='CSS1Compat') ? <br>documentElement.scrollTop (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/ <br>document.body.scrollTop (document.body.clientHeight - ceci .clientHeight)/2);/*IE5 IE5.5*/ <br><br>} <br><br>.bg { <br>couleur de fond : #ccc; <br>largeur : 100 % ; <br>hauteur : 100 % ; <br>gauche :0 ; <br>top:0;/*FF IE7*/ <br>filter:alpha(opacity=10);/*IE*/ <br>opacité:0.8;/*FF*/ <br>z-index:1 ; <br>position:fixed!important;/*FF IE7*/ <br>position:absolute;/*IE6*/ <br><br>_top: expression(eval(document.compatMode && <br>document.compatMode= ='CSS1Compat') ? <br>documentElement.scrollTop (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/ <br>document.body.scrollTop (document.body.clientHeight - this.clientHeight) /2);/*IE5 IE5.5*/ <br><br>} <br>/*La FIN*/ <br><br></style> <br><script type="text/javascript"> <br>function showDiv(){ <br>document.getElementById('popDiv').style.display='block'; <br>document.getElementById('bg').style.display='block'; <br>} <br><br>function closeDiv(){ <br>document.getElementById('popDiv').style.display='none'; <br>document.getElementById('bg').style.display='none'; <br>} <br><br></script> <br><br></head> <br><br><corps> <br><br><div id="popDiv" class="mydiv" style="display:none;"><br/>弹框内容<br/> <br><a href="javascript:closeDiv()">关闭</a></div> <br><div id="bg" class="bg" style="display:none;"></div> <br><br><div style="padding-top: 20px;"> <br><input type="Submit" name="" value="点此弹框" onclick="javascript:showDiv()" /> <br></div> <br></corps> <br></html> <br> </div>