Currently, there are many web page loading progress bars on the Internet, but most of them are fixed in time.
When a large amount of data is queried below, the webpage loading is slow. When the webpage is loaded, the progress bar is displayed. When the webpage is loaded, the progress bar disappears and the content already loaded is displayed.
Copy codeThe Code is as follows:
<Html>
<Script language = VBScript>
Dim Bar, SP
Bar = 0
Sp= 100
Function Window_onLoad ()
Bar = 95
SP = 10
End Function
Function Count ()
If Bar <100 Then
Bar = Bar + 1
SetTimeout "Count ()", SP
Else
Document. getElementById ("jdt"). style. display = "none"
Document. getElementById ("content"). style. display = ""
End if
End Function
Call Count ()
</Script>
<Body>
<Div id = "jdt"> the progress bar is displayed here. You can also add a dynamic picture. </div>
<Div id = "content" style = "display: none"> content displayed on a webpage </div>
</Body>
</Html>
----------------------------------------------------
The simplest thing is to put images. After a webpage is loaded, the hidden images are displayed.
Copy codeThe Code is as follows:
<Body onLoad = "loadDiv. style. display = 'none';" style = "margin: 0px;">
<Style type = "text/css">
# LoadDiv {
Position: absolute;
Z-index: 999;
Width: expression (document. body. clientWidth );
Height: expression (document. body. clientHeight );
Background-color: # FFFFFF;
Text-align: center;
Padding-top: 200px;
}
</Style>
<Div id = "loadDiv"> Loading... </div>
<Iframe src = "http://505551735.qzone.qq.com/">
</Iframe>
</Body>
-------------------------------------------------------
Copy codeThe Code is as follows:
<Html>
<Script language = JavaScript>
Function Loaded ()
{
Document. getElementById ("loadDiv"). style. display = "none"
Document. getElementById ("content"). style. display = ""
}
</Script>
<Body onLoad = "Loaded ()">
<Div id = "loadDiv" style = "display: block"> Loading... </div>
<Iframe id = "content" style = "display: none" src = "">