e7821f65d5a7b9afdfd46a20043666e5933afb84.svn-base 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <HTML xmlns:v>
  2. <%@ page contentType="text/html;charset=gb2312"%>
  3. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  4. <HEAD>
  5. <STYLE>
  6. v\:*{behavior:url(#default#VML);}
  7. *{font-size:12px;color:;}
  8. </STYLE>
  9. </HEAD>
  10. <BODY topmargin='2' leftmargin='2'>
  11. <div id="bar" style='table-Layout:fixed;width:100%;height:100%;z-index:2;border:0 solid black'>
  12. <v:RoundRect id='a' style='position:absolute;left:300;top:250;height:24;'>
  13. <v:Textbox inset='5px,5px,5px'><b><font color='red' id='jindu'></font></b></v:textbox>
  14. <v:fill type='gradient' id='fill1' color='blue'/>
  15. </v:RoundRect>
  16. </div>
  17. <script>
  18. //原作:风云舞,载自:http://www.lshdic.com/bbs
  19. var pos1=1,posall=500 //定义全局变量,pos1为当前进度,posall为总进度
  20. var schedulefoot=30;
  21. var timerid;
  22. playerid1=0;
  23. var endtimeout;//计时
  24. function play1(){ //播放函数
  25. if(pos1<posall)
  26. {
  27. if (pos1<posall*0.99) {pos1+=1;}
  28. }
  29. else
  30. {
  31. replay1();
  32. /*pos1=1;fill1.color="rgb("+Math.round(Math.random()*255)+","+Math.round(Math.random()*255)+","+Math.round(Math.random()*255)+")";*/}
  33. a.style.width=Math.round(300/(posall/pos1));
  34. jindu.innerText="loading..."+Math.round(100/(posall/pos1))+"%"
  35. fill1.angle=Math.round(300/(posall/pos1))
  36. playreset();
  37. }
  38. timerid = setInterval("play1()",schedulefoot) //30毫秒播放一次,一般CPU保证能消化~~~
  39. colortimerid = setInterval("changecolor()",4000)
  40. function replay1(){
  41. if (playerid1==0)
  42. {
  43. clearInterval(timerid);
  44. //timerid=setInterval("play1()",4000);playerid1=1;
  45. }
  46. }
  47. var scheduletrue=true;
  48. function playreset()
  49. {
  50. scheduletrue=!scheduletrue;
  51. if (scheduletrue==true)
  52. {
  53. clearInterval(timerid);
  54. timerid=setInterval("play1()",pos1);
  55. }
  56. }
  57. function changecolor()
  58. {
  59. fill1.color="rgb("+Math.round(Math.random()*255)+","+Math.round(Math.random()*255)+","+Math.round(Math.random()*255)+")";
  60. }
  61. function scheduleend(){
  62. pos1=500;play1();
  63. endtimeout=setInterval("document.all.bar.style.display='none';document.all.bar.style.width=0.1;document.all.bar.style.height=0.1;document.all.windforce.style.display='block';",50);
  64. endtimeout=setInterval("clearInterval(endtimeout)",60);
  65. clearInterval(colortimerid);
  66. //clearTimeout(endtimeout);
  67. }
  68. </script>
  69. <div id="windforce" style='table-Layout:fixed;width:100%;height:100%;z-index:1;border:0 solid black;display:none'>