158、打开页面的等待

158、打开页面的等待

脚本说明:

<meta http-equiv="refresh" content="10; url=http://www.7stk.com">

<style>

<!--

#bar, #barbackground{

position:absolute;

left:185;

top:120;

background-color:red;

}

 

#barbackground{

background-color:c0c0c0;

}

 

-->

</style>

<script>

//1) Set the duration for the progress bar to complete loading (in seconds)

var duration=5

 

//2) Set post action to carry out inside function below:

function postaction(){

//Example action could be to navigate to a URL, like following:

//window.location="games/checker.htm"

}

 

 

///Done Editing/////////////

var clipright=0

var widthIE=0

var widthNS=0

 

function initializebar(){

if (document.all){

baranchor.style.visibility="visible"

widthIE=bar.style.pixelWidth

startIE=setInterval("increaseIE()",150)

}

if (document.layers){

widthNS=document.baranchorNS.document.barbackgroundNS.clip.width

document.baranchorNS.document.barNS.clip.right=0

document.baranchorNS.visibility="show"

 

startNS=setInterval("increaseNS()",150)

}

}

 

function increaseIE(){

bar.style.clip="rect(0 "+clipright+" auto 0)"

window.status="已经完成了......"

if (clipright<widthIE)

clipright=clipright+(widthIE/(duration*20))

else{

window.status=''

clearInterval(startIE)

postaction()

}

}

 

function increaseNS(){

if (clipright<202){

window.status="Loading..."

document.baranchorNS.document.barNS.clip.right=clipright

clipright=clipright+(widthNS/(duration*20))

}

else{

window.status=''

clearInterval(startNS)

postaction()

}

}

 

 

window.onload=initializebar

 

</script>

<script language="JavaScript1.2">

if (document.all){

document.write('<div id="baranchor" style="position:relative;width:400px;height:20px;visibility:hidden;">')

document.write('<div id="barbackground" style="width:400px;height:20px;z-index:9"></div>')

document.write('<div id="bar" style="width:400px;height:20px;z-index:10"></div>')

document.write('</div>')

}

 

</script>

<ilayer name="baranchorNS" visibility="hide" width=400 height=20>

<layer name="barbackgroundNS" bgcolor=black width=400 height=20 z-index=11 left=0 top=0>

</layer>

<layer name="barNS" bgcolor=blue width=400 height=20 z-index=11 left=0 top=0>

</layer>

</ilayer>

<p align="center"><font size="2">Load.........</font></p>

 

Write a comment

Comments: 0