虚假的loading,其实就是一个倒计时代码,并非真正的预先载入~
<html> <head> <title>正在载入...</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0"> <table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%"> <tr> <form name=loading> <td align=center> <p><font color=gray>正在载入首页,请稍候.......</font></p> <p> <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:gray; background-color:white; padding:0px; border-style:none;"> <br> <input type=text name=percent size=46 style="font-family:Arial; color:gray; text-align:center; border-width:medium; border-style:none;"> <script>var bar = 0 var line = "||" var amount ="||" count() function count(){ bar= bar+2 amount =amount + line document.loading.chart.value=amount document.loading.percent.value=bar+"%" if (bar<99) {setTimeout("count()",100);} else {window.location = "http://www.aspxhome.com/";} } </script> </p> </td> </form> </tr> </table> </body> </html> [提示:你可先修改部分代码,再按运行]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>CN-Bruce</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body> <style type="text/css"> #divLoadCont{position:absolute; z-index:500; left:0; top:0; width:100%; height:98%; clip:rect(0,100%,100%,0); background-color:transparent; layer-background-color:white; } #divLoad1{position:absolute; layer-background-color:silver; background-color:silver} #divLoad2{position:absolute; left:0; top:0; layer-background-color:navy; background-color:navy} #divLoadText{position:absolute; background-color:transparent; font-family:arial,helvetica; color:Navy; font-size:14px; } </style> <script language="JavaScript" type="text/javascript"> function lib_bwcheck(){ //Browsercheck (needed) this.ver=navigator.appVersion this.agent=navigator.userAgent this.dom=document.getElementById?1:0 this.opera5=this.agent.indexOf("Opera 5")>-1 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0; this.ie4=(document.all && !this.dom && !this.opera5)?1:0; this.ie=this.ie4||this.ie5||this.ie6 this.mac=this.agent.indexOf("Mac")>-1 this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5) return this } var bw=new lib_bwcheck() numImages=10 //速度 loaderWidth=300 //进度条长度 currentImg=0 function lib_doc_size(){ this.x=0;this.x2=bw.ie && document.body.offsetWidth-20||innerWidth||0; this.y=0;this.y2=bw.ie && document.body.offsetHeight-5||innerHeight||0; if(!this.x2||!this.y2) return message('Document has no width or height') this.x50=this.x2/2;this.y50=this.y2/2; return this; } function lib_obj(obj,nest){ nest=(!nest) ? "":'document.'+nest+'.' this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0; this.css=bw.dom||bw.ie4?this.evnt.style:this.evnt; this.ref=this.css this.w=this.evnt.offsetWidth||this.css.clip.width|| this.ref.width||this.css.pixelWidth||0; return this } lib_obj.prototype.moveIt = function(x,y){ this.x=x;this.y=y; this.css.left=x;this.css.top=y } lib_obj.prototype.clipTo = function(t,r,b,l,setwidth){ this.ct=t; this.cr=r; this.cb=b; this.cl=l if(bw.ns4){ this.css.clip.top=t;this.css.clip.right=r this.css.clip.bottom=b;this.css.clip.left=l }else{ if(t<0)t=0;if(r<0)r=0;if(b<0)b=0;if(b<0)b=0 this.css.clip="rect("+t+","+r+","+b+","+l+")"; if(setwidth){this.css.pixelWidth=this.css.width=r; this.css.pixelHeight=this.css.height=b} } } var oLoad2 function startLoading(){ page=new lib_doc_size() oLoadCont=new lib_obj('divLoadCont') oLoad=new lib_obj('divLoad1','divLoadCont') oLoad2=new lib_obj('divLoad2','divLoadCont.document.divLoad1') oLoadText=new lib_obj('divLoadText','divLoadCont.document.divLoad1') oLoad.moveIt(page.x50-loaderWidth/2,page.y50-20) oLoadText.moveIt(loaderWidth/2 - oLoadText.w/2,10) oLoad.clipTo(0,loaderWidth,40,0,1) oLoad2.per = loaderWidth/numImages } function loadIt(ok){ currentImg++ if(oLoad2) oLoad2.clipTo(0,oLoad2.per*currentImg,40,0,1) if(!ok){ oLoadCont.css.visibility='hidden' oLoadCont=null; oLoad1=null; oLoad2=null; } } function loadIt_display(ok){ currentImg++ if(oLoad2) oLoad2.clipTo(0,oLoad2.per*currentImg,40,0,1) if(currentImg<=numImages) setTimeout("loadIt_display(1)",200) else{ oLoadCont.css.visibility='hidden' window.location="http://www.aspxhome.com/" } } </script> <div id="divLoadCont"> <div id="divLoad1"> <div id="divLoad2"></div><br> <div id="divLoadText">Loading...</div> </div> </div> <script> startLoading() //onload=loadIt; //- LEAVE THIS LINE WHILE TESTING. UNCOMMENT WHEN READY loadIt_display(1) //LEAVE THIS LINE WHILE TESTING. DELETE WHEN READY </script> </body> </html> [提示:你可先修改部分代码,再按运行]
<script language="JavaScript"> <!-- var url = 'index.asp'; //这里就是要跳到的地方 //--> </script> <title>网站数据加载中……</title> </head> <body onLoad="location.href = url"> <div style='margin-top:40;margin-left:40;margin-right:0'> <p> </p> <p align="center"> </p> <p align="center"> </p> <p align="center"> <style><!--.proccess{border:0px solid; border-color:#009900; width:2;height:15;background:eeeeee;margin:0}--></style> </p> <div style='margin-top:-20;margin-left:0;margin-right:0' align="center"> <form method=post name=proccess> <script language=javascript> document.write("<br><br><br><br><table border=0 cellspacing=1 cellpadding=0 bgcolor=#000000 ><tr bgcolor=#ffffff><td style='font:9pt Verdana;'>") for(i=0;i<200;i++)document.write("<input class=proccess >") document.write("</td></tr></table><br>") document.write("<div align=center style='font-size:9pt;color:#660000;'>Loading……,Please Wait!</div>") </script> </form> </div> <div align="center"> <script language=JavaScript><!-- var p=0,j=0; var c=new Array("#FF6600","#ffffff") setInterval('proccess();',100) function proccess(){ document.forms.proccess.elements[p].style.background=c[j]; p+=1; if(p==200){p=0;j=1-j;}} --></script> </div> </div> <div align="center"> <script> <!-- if (document.layers) document.write('<Layer src="' + url + ' " VISIBILITY="hide"> </Layer>'); else if (document.all || document.getElementById) document.write('<iframe src="' + url + '" style="visibility: hidden;"></iframe>'); else location.href = url; //--> </script> </div> </body> [提示:你可先修改部分代码,再按运行]
<SCRIPT>cnease=window.open("","etangWHSAD","top=2000");cnease.close(); focus() self.resizeTo(800,600) self.moveTo(-3,-3)</SCRIPT> <html> <head> <title>LemongTree.Net</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style type="text/css"> td,form,select,input,textarea,body {font-family: 宋体;font-color:#000000;font-size: 12px;line-height:150%;letter-spacing:2px} a:link { font-size: 9pt; text-decoration: none; color: #666666} a:visited { font-size:9pt; text-decoration: none; color: #666666} a:hover { text-decoration: none; font-size: 9pt; color: #666666} a:active { font-size: 9px; text-decoration: none; color: #666666} </style> <script> var url='http://www.aspxhome.com/'; </script> </head> <body onLoad="location.href=url;" style='overflow:hidden;overflow-y:hidden'> <div align=center> <table height=70% valign=middle align=center> <tr> <td align="center" disabled> <!-- Displaytext--> <div align="center">正在进入</div> <p></p> <font class=fontbig>页面读取中,请等待......<br> </font> <p></p><p></p> <style><!--.proccess{border:1px solid;width:8;height:8;background:#ffffff;margin:3}--></style> <p></p><p></p> <div align="center"> <form method=post name=proccess> <script language=javascript> for(i=0;i<30;i++)document.write("<input class=proccess>") </script> </form> </div></td></tr></table> <div align="center"> <script language=JavaScript>var p=0,j=0; var c=new Array("lightskyblue","white") setInterval('proccess();',100) function proccess(){ document.forms.proccess.elements[p].style.background=c[j]; p+=1; if(p==30){p=0;j=1-j;}} --></script> </div> </div> <div align="center"> <script> <!-- if (document.layers) document.write('<Layer src="../3/' + url + ' " VISIBILITY="hide"> </Layer>'); else if (document.all || document.getElementById) document.write('<iframe src="../3/' + url + '" style="visibility: hidden;"></iframe>'); else location.href=url; //--> </script> </div> [提示:你可先修改部分代码,再按运行]
<body> <div id=process>LOADING</div> <script> var num=0; function mypro() { num++; myarray=new Array('#494949','#646464','#747474','#888888','#969696','#A8A8A8','#B6B6B6','#C6C6C6','#D7D7D7','#E1E1E1','#F0F0F0','#F9F9F9') process.style.color=myarray[num-1] process.innerText=process.innerText+'>>'; if(num<12) {setTimeout("mypro()",1000);} else {window.open("http://www.aspxhome.com","new");} } mypro(); </script> [提示:你可先修改部分代码,再按运行]
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>稍候进入汉化软件下载基地主力站点</title> <META content="Microsoft FrontPage 4.0" name=GENERATOR> </head> <BODY bgColor=#ffffff topMargin=100 onload=fakeProgress(0,sb) background=0-18b.jpg> <P align="center"></P> <p> </p> <P align=center>稍候进入主力站点......</P><!-- Status Bar Starts --> <DIV align=center> <DIV id=sb style="BORDER-RIGHT: #000000 1px solid; BORDER-left: #000000 1px solid; BORDER-TOP: #000000 1px solid; BACKGROUND: blue; WIDTH: 450px; BORDER-BOTTOM: #000000 1px solid; HEIGHT: 14px; TEXT-ALIGN: left"> <DIV id=sbChild1 style="FILTER: Alpha(Opacity=0, FinishOpacity=80, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0); OVERFLOW: hidden; WIDTH: 100%; POSITION: absolute; HEIGHT: 12px"> <DIV style="BACKGROUND: white; WIDTH: 450; height:0" ;height:12px; overflow: hidden></DIV></DIV> <DIV style="FONT-SIZE: 10px; WIDTH: 450px; COLOR: white; FONT-FAMILY: arial; POSITION: absolute; HEIGHT: 14px; TEXT-ALIGN: center"></DIV></DIV><!-- Status Bar Ends --> <P></P> <DIV id=infor style="FONT-SIZE: 11px; WIDTH: 100%; COLOR: blue; FONT-FAMILY: arial; POSITION: relative; HEIGHT: 14px; TEXT-ALIGN: center"></DIV></DIV></BODY><SCRIPT type=text/javascript> <!-- var ie5 = (document.all && document.getElementsByTagName); var step = 0; function setSB(v, el, inforEl, message) { if (ie5 || document.readyState == "complete") { filterEl = el.children[0]; valueEl = el.children[1]; if (filterEl.style.pixelWidth > 0) { var filterBackup = filterEl.style.filter; filterEl.style.filter = ""; filterEl.style.filter = filterBackup; } filterEl.style.width = v + "%"; valueEl.innerText = v + "%"; inforEl.innerText = message; } } function setSBByStep(v, el, inforEl, message) { if (ie5 || document.readyState == "complete") { step = step + v; filterEl = el.children[0]; valueEl = el.children[1]; if (filterEl.style.pixelWidth > 0) { var filterBackup = filterEl.style.filter; filterEl.style.filter = ""; filterEl.style.filter = filterBackup; } filterEl.style.width = step + "%"; valueEl.innerText = step + "%" inforEl.innerText = message; } } function fakeProgress(v, el) { if (v >= 101) location.href="http://www.baidu.com/"; else { setSB(v, el, infor, "10秒钟后进入汉化软件下载基地…………"); window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 20); } } //--> </SCRIPT> <SCRIPT language=javaScript> <!-- document.oncontextmenu=new Function("event.returnValue=false;"); document.onselectstart=new Function("event.returnValue=false;"); // --> </SCRIPT> </HTML> [提示:你可先修改部分代码,再按运行]
自已做着玩的,说不定对你有用哦。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>loading speed</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body> Jarry testing for loading bar <hr> 请从下框中选择下载表示的进度! <hr> <div id="bg" style="position:relative; width:100px; height:5px; z-index:1; background: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000;"><div id="bar" style="position: relative; width:0%; height:5px; z-index:1; background: #006600; layer-background-color: #006600; border: 1px none #000000;"></div> </div> <div style="float:;left:100;width:100;"><input type="button" id="control" name="Submit" value="Auto" onClick="playAndpause(this)" style="float:none"></div> <br> <br> <script language="JavaScript" type="text/JavaScript"> var x=1; var autoRun=null; var o; var maxNum=100; var loadSpeed=100; function speedBar(obj,num) { if(num!="") { _obj=document.getElementById(obj); _obj.style.width=num+"%"; x=num; if(x==maxNum) { finishPlay(); } } } function playAndpause(o) { if(o.value=="Auto") { myclear(); play(); o.value="Pause"; } else if(o.value=="Replay") { x=1; myclear(); play(); o.value="Pause"; } else if(o.value=="Pause") { myclear(); o.value="Auto"; } } function play() { //for(i=1;i<101;i++) { document.getElementById('bar').style.width=x+"%"; //} if(x<maxNum){ x++;//alert(document.getElementById('bar').style.width) } if(x==maxNum) { finishPlay(); } autoRun=setTimeout('play()',loadSpeed); } function myclear() { clearTimeout(autoRun); } function finishPlay() { document.getElementById('control').value="Replay"; } </script> <form name="form1" method="post" action="" > <select name="select" onchange="speedBar('bar',this.value)"> <option value="0" checked>-请选择-</option> <script language="JavaScript" type="text/JavaScript"> for(var i=1;i<101;i++) { if(i<10) document.write("<option value="+i+">0"+i+"</option>"); else document.write("<option value="+i+">"+i+"</option>"); } </script> </select> </form> </body> </html> [提示:你可先修改部分代码,再按运行]