文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 精品软件 | 下载排行 | 推荐下载 | WPS | 杀毒软件
清风网络
首 页 软件下载 网络学院
QQ 电脑入门 游戏 操作系统 图形处理 办公软件 媒体动画 精文荟萃 工具软件 网络编程 程序开发 网络技术 认证考试 网站建设 文章专栏
当前位置:清风网络网络编程ScriptsetTimeout 的用法详细介绍
精品推荐
特别推荐
·主页javascript特效19则
·各种网页媒体播放器代码及详解
·用户体验:JS实现仿新浪信息提示效果
·网页特效:图片随机显示实例详解
·JavaScript入门学习书籍的阶段选择
·Javascript代码轻松隐藏网页源文件
·网页制作:JavaScript仿Windows关机效果
·网页制作Javascript经典小技巧总结
热点TOP10
·javascript实现语法分色编辑器
·总结性知识:107个常用Javascript语句
·Javascript模拟的DOS窗口代码实例
·JavaScript应用实例:网页折叠菜单
·撕页广告代码及简介
·用javascript作消息提示框(类似于QQ用户上线的消息提示)
·使用Javascript创建XML文件
·用vbscript实现在文本文件中搜索两个项

setTimeout 的用法详细介绍

日期:2007年7月6日 作者: 查看:[大字体 中字体 小字体]

例子:
<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:
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.
Remarks
In versions earlier than Microsoft® Internet Explorer 5, the first argument of setTimeout must be a string. Evaluation of the string is deferred until the specified interval elapses.
As of Internet Explorer 5, the first argument of setTimeout can be a string or a function pointer.
The specified expression or function is evaluated once. For repeated evaluation, use the setInterval method.
When you use the setTimeout method with Introduction to DHTML Behaviors, the value of vCode should be a function pointer to call a function within the HTML Component (HTC) file or a string to call a function in the primary document.
 
欢迎转载。




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

下一篇:javascript用回车键实现Tab键功能
相关文章:
·Microsoft Windows CE系统介绍
·最详细的黑客入门法则
·《盟军敢死队:打击力量》详细流程攻略
·[战神]详细流程攻略 - 战神攻略秘籍 - 战神
·基于SQL Server的WEB应用程序注入攻击详细介绍
·ping 命令的用法大全
·压缩大作战 流行压缩软件详细评测
相关软件:
·宏越融睿学者-常用法语700句1.00
·MAC OSX 10.4.7 iso 其他介绍
·张孝祥 Java视频教程全集附源代码 RMVB 其他介绍
·《苍天》双手大刀操作方法介绍视频
·《苍天》偃月刀操作方法介绍视频
·地球帝国3介绍视频
·《仙剑奇侠传四》详细迷宫完全攻略

特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.viphot.com
| 帮助(?) | 版权声明 | 友情连接 | 关于我们 | 信息发布
Copyright 2007 www.viphot.com All Rights Reserved. 鄂ICP备05000083号Powered by:viphot