نسخة الكود كما يلي:
<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en"
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html ؛ charset = gbk" />
<title> Unted Document </title>
<type type = "text/css">
/* نمط الطبقة المنبثقة*/
HTML ، الجسم {الارتفاع: 100 ٪ ؛ الهامش: 0px ؛ حجم الخط: 12px ؛}
.mydiv {
لون الخلفية: #ff6 ؛
الحدود: 1 بكسل Solid #F90 ؛
محاذاة النص: المركز ؛
رفع الخط: 40 بكسل ؛
حجم الخط: 12 بكسل ؛
خط الرصيف: جريئة ؛
Z-index: 99 ؛
العرض: 300 بكسل ؛
الارتفاع: 120 بكسل ؛
اليسار: 50 ٪ ؛/*ff ie7*/
أعلى: 50 ٪ ؛/*ff ie7*/
الهامش اليساري: -150px! مهم ؛/*ff ie7 هذه القيمة نصف عرض نفسها*/
الهامش: -60px! مهم ؛/*ff ie7 هذه القيمة نصف أعلى*/
الهامش: 0px ؛
الموضع: ثابت! مهم ؛/*ff ie7*/
الموقف: مطلق ؛/*ie6*/
_top: التعبير (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 {
خلفية اللون: #CCC ؛
العرض: 100 ٪ ؛
الارتفاع: 100 ٪
اليسار: 0 ؛
أعلى: 0 ؛/*ff ie7*/
مرشح: ألفا (عتامة = 50) ؛/*ie*/
التعتيم: 0.5 ؛/*ff*/
Z-index: 1 ؛
الموضع: ثابت! مهم ؛/*ff ie7*/
الموقف: مطلق ؛/*ie6*/
_top: التعبير (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*/
}
/*النهاية*/
</style>
<script type = "text/javaScript">
وظيفة showdiv () {
document.getElementById ('popdiv'). style.display = 'block' ؛
document.getElementById ('bg'). style.display = 'block' ؛
}
وظيفة jousingiv () {
document.getElementById ('popdiv'). style.display = 'none' ؛
document.getElementById ('bg'). style.display = 'none' ؛
}
</script>
</head>
<body>
<div id = "popdiv" style = "display: none ؛"> تهانينا! <br/> درجتك هي: 60 نقطة <br/>
<a href = "javaScript: inchediv ()"> أغلق النافذة </a> </iv>
<div id = "bg" style = "display: none ؛"> </div>
<div style = "padding-top: 20px ؛">
<type type = "submit" name = "" value = "display layer" onClick = "javaScript: showdiv ()" />
</div>
</body>
</html>