Evaluates an expression after a specified number of milliseconds has elapsed.

(在指定时间过后执行指定的表达式)


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.

Return Value

Integer. Returns an identifier that cancels the evaluation with the clearTimeout method.

==============================================================

以上内容摘自某本JScript教程(CHM格式,出处不详,跟原作者说声Sorry)


以下内容没抄任何人的,如果有雷同,估计不是你抄偶的就是巧合,嘿嘿.

——————————————————————-
setTimeout( alert(“3秒种过去了"), 3000);//调用一个函数,允许带常量参数<br />
——————————————————————-

setInterval()的用法和setTimeout()是一样的:

不同的是setTimeout()是一次性作用,而setInterval()是每隔<em>iMilliSeconds就执行一次<em>vCode.(Evaluates an expression each time a specified number of milliseconds has elapsed)

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注