ASP to implement the Code program with progress bar test speed

Source: Internet
Author: User
Tags date implement
The ASP realizes the test speed with the progress bar. Save the following code as XXX. ASP files, on your server can be run directly.

<%
Response.Expires = 0
Response.ExpiresAbsolute = Now ()-1
Response.AddHeader "Pragma", "No-cache"
Response.AddHeader "Cache-control", "private"
Response.CacheControl = "No-cache"
%><title> Speed Test -51windows.net</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<body style= "cursor:wait;" >
<p style= "FONT-SIZE:18PT;" ><B> Speed Test </B></p>
<p id= "T" style= "FONT-SIZE:16PT;" > is testing, please wait ...</p>
<span style= "Width:300;height:16px;background-color:gray;" ><span id= "P" style= "width:0;height:16px;background-color:red;" ></span></span>
<script language= "javascript" >st = new Date (); function $ (p) {document.getElementById ("T"). Innerhtml= "Testing, please wait ... ("+p+"%) ";d Ocument.getelementbyid (" P "). Style.width=p*3} </script>
<%
DEFAULTFS = 200 ' data default size (K)
MINFS = 100 ' data minimum value
MAXFS = 500 ' data Highest value
FS = Request ("s")
If Len (fs) = 0 or IsNumeric (FS) = False Then fs = Defaultfs
if int (fs) > MAXFS then fs = Maxfs
if int (FS) < MINFS then fs = MINFS//ASP98,CN
For A=1 to fs%><!--$%^)!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () ()!@#$%^&* ()!@#$%^&* () !@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () ()!@#$%^&* ()!@#$%^ &* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () %^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () #$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () ()!@#$%^&* ()!@#$%^&* () !@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () ()!@#$%^&* ()!@#$%^ &* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () %^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () #$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () ()!@#$%^&* ()!@#$%^&* () !@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* () ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()!@#$%^&* ()--><script language=javascript>$ (<%=int (A *100/FS) </script><%next%>%>)
<script language=javascript>
Et=new Date ();d s=<%=fs%>;s=math.round (Ds*1000/(et-st) *10)/10;document.body.style.cursor= ' default ';
Nextsize=<%=fs%>;if (s>100) {nextsize=<%=maxfs%>;} else if (s<20) {nextsize=<%=minfs%>;}
document.getElementById ("T"). innerhtml= "Test completed. Your speed: <font color= ' red ' > ' +s+ ' </font> (k/sec) [<a href= '? s= "+nextsize+" &t= "+math.random () +" ' > re-Test </a>] "; &LT;/SCRIPT&GT;//ASP98,CN
</body>


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.