一個(gè)實(shí)現(xiàn)VBS倒計(jì)時(shí)的代碼
以下內(nèi)容為程序代碼:
script language="VBScript">
Dim oTime : oTime = 5
Function STime
document.all("oInput").value = "00:00:" oTime
If oTime>0 Then
oTime = oTime - 1
window.setTimeout "STime", 1000
Else
MsgBox "時(shí)間到了!"
End If
End Function
Sub Window_Onload
Call STime
End Sub
msgbox(value)
/script>
input id="oInput" type="text">
把上面這段保存為001.html可以成為一個(gè)完整的倒計(jì)時(shí)器,哪位幫我把他改成VBS一下,讓其能變成VBS倒計(jì)時(shí)器!
復(fù)制代碼 代碼如下:
Set WshShell = CreateObject("WScript.Shell")
Dim CloseTime,i
CloseTime = 5
For i = CloseTime To 1 Step - 1
WshShell.popup "當(dāng)前時(shí)間為" i,1,"計(jì)時(shí)",0
Wscript.Sleep 1000
Next
MsgBox "時(shí)間到!"
Set WshShell = Nothing
您可能感興趣的文章:- Delphi實(shí)現(xiàn)毫秒級(jí)別的倒計(jì)時(shí)實(shí)例代碼
- jquery實(shí)現(xiàn)倒計(jì)時(shí)代碼分享
- js實(shí)現(xiàn)網(wǎng)頁(yè)倒計(jì)時(shí)、網(wǎng)站已運(yùn)行時(shí)間功能的代碼3例
- 各種頁(yè)面定時(shí)跳轉(zhuǎn)(倒計(jì)時(shí)跳轉(zhuǎn))代碼總結(jié)
- android實(shí)現(xiàn)倒計(jì)時(shí)功能代碼
- VB實(shí)現(xiàn)的16位和32位md5加密代碼分享
- VB實(shí)現(xiàn)的遞歸復(fù)制文件和搜索文件的代碼分享
- VB實(shí)現(xiàn)的倒計(jì)時(shí)類代碼詳解