setTimeout 的用法详细介绍

2008-02-23 07:58:05来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

例子: <SCRIPT> var g_oToHide = null; function fnHide(oToHide){ g_oToHide = oToHide; window.setTimeout(fnHide2, 3000); } function fnHide2(sID){ if (g_oToHide) { g_oToHide.style.display="none"; } } </SCRIPT> <INPUT TYPE=button VALUE="Now you see me ..." ID="oHideButton" onclick="fnHide(this)"> 解释: 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:

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:简单实用技巧之网页表格特效

下一篇:javascript用回车键实现Tab键功能

JScript Language is JScript.
VBScript Language is VBScript.