|
下拉式的页面初始化 |
|
其实网页的初始化方式有很多种。
以下的例子就介绍了页面初始化的一种形式: <html> <head> <title>Example</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style type="text/css"> <!-- body { background-color: #0066CC; clip: rect( ); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-image: url(http://www.oso.com.cn/image/logo.gif)} --> </style> <script> var done=0; var curscr=0; var speed=1; function ol() { divmove.style.top=document.body.scrollHeight; divmove.style.height=document.body.clientHeight; setTimeout(ol2,1); } function ol2() { varscr=document.body.scrollHeight; document.body.scrollTop=varscr; adjWnd(); } function adjWnd() { varscr-=speed; document.body.scrollTop=varscr; if(varscr<1) { done=1; divmove.style.top=0; divmove.style.visibility="hidden"; } if(!done)setTimeout("adjWnd();",1); } </script> </head> <body bgcolor="#FFFFFF" text="#000000" onload="ol();"> <div id="divmove" style="position:absolute; left:-1px; top:282px; width:100%; height:83px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000"> <div align="center"> <font color=cyan face="Arial, Helvetica, sans-serif" size=6> <p>WWW.OSO.COM WELCOME YOU</P> <p>↓ ↓ ↓ ↓ ↓ ↓ ↓</P> <p>↓ ↓ ↓ ↓ ↓</P> <p>↓ ↓ ↓</P> <p>↓</P> </font></div> </div> <br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><hr> </body></html> |