When a webpage is loaded, the page displays the progress bar. After loading, the webpage content is displayed.

Source: Internet
Author: User

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 = "">

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.