<! DOCTYPE html>"en">"UTF-8"> <title></title> <script src=".. /.. /jq-practice/jq/jquery-2.2.1.min.js"></script> <script>$ (function () {$ ('. INPUT1'). Click (function () {varologin=$ ('<div class= "login" > <p> user name: <input type= "text"/></p> <p> password: <input type= "text"/ ></p> <div class= "closeicon" >X</div> </div>'); $('Body'). Append (ologin); Ologin.css (' left', ($ (window). width ()-ologin.width ())/2); Ologin.css ('Top', ($ (window). height ()-ologin.height ())/2); $ (window). On ('Resize Scroll', function () {ologin.css (' left', ($ (window). width ()-ologin.width ())/2); Ologin.css ('Top', ($ (window). height ()-ologin.height ())/2+$ (window). scrolltop ()); }) $('. Closeicon'). Click (function () {ologin.remove (); }) }) }) </script> <style>. login{position:absolute; width:300px; height:300px; BORDER:1PX Solid red; }. closeicon{position:absolute; right:0px; top:0px; } </style>"height:2000px;"><input type="Button"Value="Click" class="INPUT1"/><!--<divclass="Login">--> <!--<p> user name: <input type="text"/></p>--> <!--<p> password: <input type="text"/></p>--> <!--<divclass="Closeicon">X</div>--><!--</div>--></body>jquery instance-simple Tab-"some Common methods (2)-practice"