<br> $(function () {> // Click the button to pop up an advertisement at the bottom right of the page <br> $ ('#btn'). Click (function () {<br> </p> // Layer<p> var dvObj = $('<div id="dv" style="border:1px solid red; width:300px; height:200px; position:absolute;right:0;bottom:0;"> </div>').appendTo($('body'));<br> </p> //Step 2: Create a close button (true close and false close) and add it to the layer<p> A close button (fake close, click the close button to jump directly to the page) <br> ;Close</a>').appendTo(dvObj);<br> span & gt; '). Click (function () {<br> Window.Location.href = "http://www.baidu.com"; <br>}). /Step 3: Really close the addition to the layer<br> <br> dvObj.remove();<br> }).appendTo(dvObj);</p> <p> //Step 4: Create a picture and add it to the layer<br> $('<img src ="gg.gif" style="clear:both">').appendTo(dvObj);<br> ;/head><br> <body></p> <input type="button" name="name" value="pop-up ad" id="btn" /><p> </body><br> <br> <br> </p>---Final effect <p> <br><br> <br></p>