jquery--Pop-up window

Source: Internet
Author: User

<title> pop-up </title> <script src="Js/jquery-1.7.2.js"></script> <style type="Text/css">#tanchuang {position:fixed;/*Fixed window*/top:100px; Width: -%;       height:300px; Top:-1000px; Left: *%;        Overflow:hidden; Z-index:100001;/*The pop window is taller than the mask .*/} #tc_top {position:relative; Width: -%;        height:40px; Background-color: #0026ff;        Color:white; Text-Align:center; Line-height:40px;        } #tc_main {position:relative; Width: -%;        height:220px; Background-color: #0ff;        } #tc_maintext {position:relative; Width: -%; Height: the%; Left: the%; Top:Ten%; Background-Color:orange; Text-Align:center;        } #tc_bottom {position:relative; Width: -%;        height:40px; Background-color: #0026ff;        } #tc_btnok {position:relative; Width: -%;        height:30px; Background-color:#808080; Left: *%;        top:5px; Text-Align:center;        Color:white; Line-height:30px;        Cursor:pointer; } #zhezhao {position:fixed; Width: -%; Height: -%; Background-Color:black; Z-index:100000; Opacity:0.4;        Display:none; }    </style>
View Code
<input type="text"Id="Biaoti"/><br/> <input type="text"Id="Neirong"/> <!--pop-up window starts--<div id="Zhezhao"></div> <div id="Tanchuang"> <div id="Tc_top"></div> <div id="Tc_main"> <div id="Tc_maintext"></div> </div> <div id="Tc_bottom"> <div id="Tc_btnok"> OK </div> </div> </div> <input type="Button"Value="pop -up window"Id="TC"/> <!--pop-up window ends--</form></body>"Js/tanchuang.js"></script><script type="Text/javascript">    $("#tc"). Click (function () {TC ("title","content");    }); </script>
Function TC (A, b) {//the method can be called$("#zhezhao"). Show (); $("#tanchuang"). Animate ({top:" -"}, -). Animate ({top:" -"}, $). Animate ({top:" -"}, $); $("#tc_top"). text (a); $("#tc_maintext"). Text (b);}; $("#tc_btnok"). Click (function () {$ ("#tanchuang"). Animate ({top:"-2000"}, -, Function () {$ ("#zhezhao"). Hide (); });//Click OK to bounce away});

jquery--Pop-up window

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.