vbs脚本可以使用setTimeout函数吗?

来源:百度知道 编辑:UC知道 时间:2024/07/04 06:11:45
setTimeout "myFunction()",1000

显示错误,类型不匹配'settimeout'

vbs里面很少用setTimeout 函数
setTimeout 是javascript的内置函数!!!
window.setTimeout(vCode, iMilliSeconds [, sLanguage])

Syntax

iTimerID = window.setTimeout(vCode, iMilliSeconds [, sLanguage])
Parameters

vCode Required. Variant that specifies the function pointer or string that indicates the code to be executed when the specified interval has elapsed.
iMilliSeconds Required. Integer that specifies the number of milliseconds.
sLanguage Optional. String that specifies one of the following values: JScript Language is JScript.
VBScript Language is VBScript.
JavaScript Language is JavaScript.

sLanguage 这个参数就是指明语言类型的可以是 VBScript JavaScript JScript