很酷的javascript loading效果代碼_javascript技巧

來源:互聯網
上載者:User
複製代碼 代碼如下:

<font color=red><script language="JavaScript"> 
<!-- 
var url = 'http://www.jb51.net'; ///這裡是你的網址  
//--> 
</script> 
</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;'> 資料正在載入中......</div>")
</script> 

  <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></font>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.