|
状态栏下的预下载研究 |
Author:咖啡虫 PublishTime:2005-3-19 |
<html> <head> <title> </title> <SCRIPT language=VBScript> Dim Bar, Line, SP Bar = 0 Line = "." SP = 100
Function Window_onLoad() Bar = 10 SP = 10 End Function
Function Count() If Bar < 100 Then Bar = Bar + 1 Window.Status = "已成功下载" & Bar & "%" & " " & String(Bar, Line) setTimeout "Count()", SP Else Window.Status = " www.cn-media.com ·-----咖啡虫---中国媒体--·" Document.Body.Style.Display = "" End If End Function
Call Count() </SCRIPT> </head> <body> </body> </html> 解释:Window_onLoad() 函数用来定义预先载入的函数 setTimeout(...) "告诉" 计时器当时间到了就呼叫 Count() |
| | |