<%@ Page language="C #"autoeventwireup="true"codefile="Default.aspx.cs"inherits="_default"%><! DOCTYPE html>"http://www.w3.org/1999/xhtml">"Server"><meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/> <script src="Js/jquery-1.7.1.min.js"></script> <title></title> <style type="Text/css">#tc {position:fixed; width:400px; Left: -%; Margin-left:-200px; Top:-500px; BORDER:1PX Solid Navy; Box-shadow:0 010px #808080; Border-radius:10px 11px; Z-index: One; } #tc-Top {width: -%; height:30px; Background-Color:navy; Color:white; Font-size:18px; Font-Weight:bold; Text-Align:center; Line-height:30px; Border-radius:10px 11px; } #tc-Bottom {position:relative; Width: -%; height:40px; } #tc-btn1 {position:absolute; width:100px; height:30px; top:5px; Background-Color:navy; Color:white; Text-Align:center; Line-height:30px; Cursor:pointer; Left: -%; Margin-left:-50px; } #tc-Btn1:hover {background-color:red; Color:green; } #tc-main {padding:20px; Text-Align:center; Background-Color:white; } #tc-zz {position:fixed; top:0px; left:0px; Width: -%; Height: -%; Background-Color:black; Opacity:0.3; Display:none; Z-index:Ten; } </style>"Form1"runat="Server"> <input type="Button"Value="Popup"Id="BTN1"/> <div id="TC"> <div id="Tc-top"> here is the title </div> <div id="Tc-main"> Here is the content, there may be a lot of words AH!! Here is the content, there may be a lot of words AH!! Here is the content, there may be a lot of words AH!! Here is the content, there may be a lot of words AH!! Here is the content, there may be a lot of words AH!! Here is the content, there may be a lot of words AH!! Here is the content, there may be a lot of words AH!! </div> <div id="Tc-bottom"> <div id="TC-BTN1"> OK </div> </div> </div> <div id="Tc-zz"></div> </form></body>"Text/javascript"> $("#btn1"). Click (function () {Myalert ('I'm Xiao Qian .','Xiao Qian: Hello!! '); }); function Myalert (t, c) {$ ("#tc-top"). Text (t); $("#tc-main"). HTML (c); $("#tc"). Animate ({top:" -"}, -). Animate ({top:" -"}, -). Animate ({top:" -"}, -); $("#tc-zz"). CSS ("Display","Block"); } $("#tc-btn1"). Click (function () {$ ("#tc"). Animate ({top:" the"}, $). Animate ({top:"-500"}, -, function () {$ ("#tc-zz"). CSS ("Display","None"); }); });</script>
2017-6-4 jQuery actual combat pop-up window production