The method of the right bottom corner window of JavaScript realization
This article illustrates the method of the lower right corner window of JavaScript implementation. Share to everyone for your reference. Specifically as follows:
?
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26-27--28 29---30 31--32 33 34 35 36 37 38-39 40 41 42 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 5 86 87 88 89 90 91 92 |
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns=" http://www.w3.org/1999/xhtml "> <head> <meta http-equiv=" Content-type "content=" text/html; charset=gb2312 "/> <title> the bottom right corner of the window </title> <style type=" Text/css "> body {background: #333333;} winpop {width:200px; height:0px; position:absolute; right:0; bottom:0; border:1px solid #999999; margin:0; padding:1px; o Verflow:hidden; Display:none; Background: #FFFFFF} #winpop. title {width:100%; height:20px; line-height:20px; background: #FFCC00; font-weight:bold; Text-align:center; font-size:12px; #winpop. con {width:100%; height:80px; line-height:80px; font-weight:bold; font-size:12px; color: #FF0000; Text-decoration:underline; Text-align:center} #silu {font-size:13px; color: #999999; position:absolute; right:0; text-align:right; Text-decoration:underline; line-height:22px; } close {position:absolute; right:4px; top:-1px; Color: #FFFFFF; Cursor:pointer} </style> <script type= "Text/javascript" > Function Tips_pop () {var msgpop= document.getElementById ("winpop"); var poph=parseint (MsgPop.style.height); if (poph==0) {msgpop.style.display= "block"; Show=setinterval ("Changeh (' Up ')", 2);} else {hide=setinterval ("Changeh" (' Down ') ", 2); } function Changeh (str) {var Msgpop=document.getelementbyid ("winpop"); var poph=parseint (MsgPop.style.height); if ( str== ' Up ' {if (poph<=100) {msgpop.style.height= (poph+4). toString () + "px";} else{clearinterval (show);}} if (str==) Down ") {if (poph>=4) {msgpop.style.height= (popH-4). toString () +" px ";} else{Clearinterval (hide); Msgpop.style.display= "None"; }} window.onload=function () {document.getElementById (' winpop '). style.height= ' 0px '; settimeout ("Tips_pop ()", 800);} </script> </head> <body> Content display content content display content display content display content display content display content display content display content display content display <hr> <div id= "Silu" > <button onclick= "Tips_pop ()" > Test button </BUTTON> </div> <div id= "winpop" > <div class= "title" > You have new messages <span class= "Close" onclick= "Tips_pop ()" >x </span></div> <div class= "con" > Unread information (1) </div> </div> <div>http://www.jb51.net/ </div> </body> </html> |
The
wants this article to help you with your JavaScript programming.