可持续影响指标分类:setTimeout函数怎么用?

来源:百度文库 编辑:中科新闻网 时间:2024/05/08 02:08:11
是vbscript下的还是javascript下的?基于vbscript的asp可以用吗?怎么用?

javascript下得。
setTimeout Method

--------------------------------------------------------------------------------

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.

vbscript基本一样。

看看下面代码就知道了

<script language=javascript>window.setTimeout("alert('hi')",5000) </script>
<script language=vbs>window.setInterval "msgbox('hi')",5000 </script>

vbscript 和 javascript都可以用,但是只能是客户端使用。不能在Asp里面用

window.setTimeout("alert('hello')", 500);

setTimeout=5000

代码执行的最大时间,