Jquery + CSS mode dialog box

Source: Internet
Author: User

<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<Head>
<Title> mode dialog box example </title>
<Meta name = "generator" content = "editplus">
<Meta name = "author" content = "">
<Meta name = "keywords" content = "">
<Meta name = "Description" content = "">
<SCRIPT src = "jquery-1.5.2.min.js" type = "text/JavaScript"> </SCRIPT>
<SCRIPT type = "text/JavaScript" Language = "JavaScript">
$ (Function (){
$ (". Seltree"). Live ("click", function () {$ (". emptree,. bgdiv"). Show ();});
$ (". Close"). Live ("click", function (){
$ (This). Parents (". SHQ,. Box"). Hide ();
$ (". Bgdiv"). Hide ();
});

 
});
</SCRIPT>
<Style type = "text/CSS">
. Bgdiv {position: absolute; top: 0px; Background: URL (../images/divbg2.png); display: none; width: 100%; Height: 100%}
. SHQ {width: 507px; Height: 488px; Border: 5px solid # 219acf; position: absolute; margin-left:-253px; left: 50%; top: 60px; Background: # ebf3f6; display: None}
. Boxhead {width: 100%; Height: 27px; Background: URL (../images/box_bg.jpg) Repeat-X ;}
. Boxhead Div {margin-left: 10px}
. Shtitle {margin-left: 10px; Height: 25px; line-Height: 25px; float: Left}
. Shclose {width: 20px; cursor: pointer; float: Right; color: # 94938e; font-weight: bold; font-size: 16px; Height: 25px; line-height: 25px ;}
</Style>
</Head>
 
<Body>
<Input type = "button" id = "button" value = "Mode dialog box" class = "seltree"/>

<! -- Select View -->
<Div class = "bgdiv"> </div>
<Div class = "SHQ emptree" name = "SHQ" style = "height: pixel PX; width: pixel PX; display: none">
<Div class = "boxhead">
<Div class = "shtitle"> select View </div>
<Div class = "shclose close"> × </div>
</Div>
Asdfasdfasdf
<Input type = "Submit" name = "button2" id = "button2" value = "OK" class = "BTN close"/>
<Input type = "Submit" name = "button3" id = "button3" value = "cancel" class = "BTN close"/>
</Div>
</Body>
</Html>

 

 

 

<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<Head>
<Title> mode dialog box example </title>
<Meta name = "generator" content = "editplus">
<Meta name = "author" content = "">
<Meta name = "keywords" content = "">
<Meta name = "Description" content = "">
<SCRIPT src = "jquery-1.5.2.min.js" type = "text/JavaScript"> </SCRIPT>
<SCRIPT type = "text/JavaScript" Language = "JavaScript">
$ (Function (){
$ (". Seltree"). Live ("click", function () {$ (". bgdiv,. emptree"). Show ();});
$ (". Close"). Live ("click", function (){
$ (This). Parents (". SHQ,. Box"). Hide ();
$ (". Bgdiv"). Hide ();
});
$ (". Bgdiv"). Height ($ (document). Height ());
$ (". Close"). Live ("click", function (){
$ (This). Parents (". SHQ,. Box"). Hide ();
$ (". Bgdiv"). Hide ();
});

});
</SCRIPT>
<Style type = "text/CSS">
. Bgdiv {position: absolute; top: 0px; Background: URL (../images/divbg2.png); display: none; width: 100%; Height: 100%}
. SHQ {width: 507px; Height: 488px; Border: 5px solid # 219acf; position: absolute; margin-left:-253px; left: 50%; top: 60px; Background: # ebf3f6; display: None}
. Boxhead {width: 100%; Height: 27px; Background: URL (../images/box_bg.jpg) Repeat-X ;}
. Boxhead Div {margin-left: 10px}
. Shtitle {margin-left: 10px; Height: 25px; line-Height: 25px; float: Left}
. Shclose {width: 20px; cursor: pointer; float: Right; color: # 94938e; font-weight: bold; font-size: 16px; Height: 25px; line-height: 25px ;}
</Style>
</Head>
 
<Body>
<Input type = "button" id = "button" value = "Mode dialog box" class = "seltree"/>

<! -- Select View -->
<Div class = "bgdiv"> </div>
<Div class = "SHQ emptree" name = "SHQ" style = "height: pixel PX; width: pixel PX; display: none">
<Div class = "boxhead">
<Div class = "shtitle"> select View </div>
<Div class = "shclose close"> × </div>
</Div>
Asdfasdfasdf
<Input type = "Submit" name = "button2" id = "button2" value = "OK" class = "BTN close"/>
<Input type = "Submit" name = "button3" id = "button3" value = "cancel" class = "BTN close"/>
</Div>
</Body>
</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.