La copie de code est la suivante:
<! Doctype html public "- // w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<adal>
<meta http-equiv = "contenu-type" contenu = "text / html; charset = gbk" />
<Title> UNT intitulé Document </Title>
<style type = "text / css">
/ * Style du calque pop-up * /
HTML, corps {hauteur: 100%; marge: 0px; taille de police: 12px;}
.mydiv {
Color d'arrière-plan: # FF6;
Border: 1px solide # f90;
Texte-aligne: Centre;
hauteur de ligne: 40px;
taille de police: 12px;
Police-poids: Bold;
Z-Index: 99;
Largeur: 300px;
hauteur: 120px;
Gauche: 50%; / * ff ie7 * /
en haut: 50%; / * ff ie7 * /
marge-gauche: -150px! IMPORTANT; / * ff ie7 Cette valeur est la moitié de la largeur de lui-même * /
marge: -60px! IMPORTANT; / * ff ie7 Cette valeur est la moitié du plus haut * /
marge: 0px;
Position: fixe! importante; / * ff ie7 * /
Position: Absolute; / * ie6 * /
_top: Expression (EVAL (document.compatmode &&
document.compatMode == 'CSS1Compat')?
documentElement.scrollTop + (document.DocumentElement.ClientHeight-This.offsetheight) / 2: / * ie6 * /
document.body.scrolltop + (document.body.clientHeight - this.clientHeight) / 2); / * ie5 ie5.5 * /
}
.bg {
Color d'arrière-plan: #ccc;
Largeur: 100%;
hauteur: 100%;
à gauche: 0;
en haut: 0; / * ff ie7 * /
Filtre: alpha (opacité = 50); / * ie * /
Opacité: 0,5; / * ff * /
Z-Index: 1;
Position: fixe! importante; / * ff ie7 * /
Position: Absolute; / * ie6 * /
_top: Expression (EVAL (document.compatmode &&
document.compatMode == 'CSS1Compat')?
documentElement.scrollTop + (document.DocumentElement.ClientHeight-This.offsetheight) / 2: / * ie6 * /
document.body.scrolltop + (document.body.clientHeight - this.clientHeight) / 2); / * ie5 ie5.5 * /
}
/*La fin*/
</ style>
<script type = "text / javascript">
fonction showDiv () {
document.getElementById ('popdiv'). style.display = 'bloc';
document.getElementById ('bg'). style.display = 'block';
}
fonction closev () {
document.getElementById ('popdiv'). style.display = 'Aucun';
document.getElementById ('bg'). style.display = 'Aucun';
}
</cript>
</ head>
<body>
<div id = "popdiv" style = "affichage: aucun;"> Félicitations! <br/> Votre note est: 60 points <br/>
<a href = "javascript: closev ()"> Fermez la fenêtre </a> </div>
<div id = "bg" style = "affichage: aucun;"> </div>
<div style = "padding-top: 20px;">
<input type = "soumi" name = "" value = "display couche" onclick = "javascript: showdiv ()" />
</div>
</docy>
</html>