<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<title> New Page </title>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<meta name= "description" content= "Boolean education http://www.itbool.com"/>
<script src= "Http://libs.baidu.com/jquery/1.10.2/jquery.min.js" ></script>
<!--<script type= "Text/javascript" src= "Background.js" ></script>-
<!--jquery section--
<script type= "Text/javascript" >
$ (function ()
{
$ ("#but"). Click (function () {
Gets the height of the current page
var height=$ (' body '). CSS (' height ');
Append masking layer Elements
$ (' body '). Append
("<div id=background style= ' height:" +height+ "';></div>")
Show pop-up box
$ ("#hide"). Slidedown ("slow");
})
$ ("#close"). Click (function () {
Close the Popup box
$ (this). Closest (' div '). Hide ();
$ ("#background"). Remove ();
})
$ (". Text"). Click (function () {
Alert ($ (this). attr (' id '));
})
})
</script>
<!--CSS section--
<style type= "Text/css" >
#background {
left:0px;
top:0px;
width:100%;
opacity:0.7;
Z-index:8;
Background:gray;
Position:absolute;
}
#hide p{
Color: #ffffff;
}
</style>
<!--HTML section--
<body style= "magin:0px 0px;p adding:0px 0px;height:700px" >
<div id= "test" style= "width:100%; Height:700px;background: #dddddd ">
<button id= "But" > button </button>
<button class= "text" id= "T1" > Test button 1</button>
<button class= "text" id= "t2" > Test button 2</button>
<button class= "text" id= "T3" > Test button 3</button>
The <p> class is rich in appearance </p>
The <p> class is rich in appearance </p>
The <p> class is rich in appearance </p>
The <p> class is rich in appearance </p>
The <p> class is rich in appearance </p>
The <p> class is rich in appearance </p>
<div id= "Hide" style= "Width:300px;height:200px;top:100px;left:200px;position:absolute;background:gray;z-index : 9;display:none;box-shadow:50px 50px 25px #888888; border:5px Solid Orange
">
<button id= "Close" style= "Float:right" > Close </button>
<p> is still rich in class capacity </p>
<p> is still rich in class capacity </p>
<p> is still rich in class capacity </p>
</div>
</div>
</body>
jquery popup window, lock background method