请教暂停程序的函数(急救中!)
给一个时间参数,当程序运行到该函数时可以在时间范围内阻止程序往下执行,如
xxxxx;
xxx;
stop(time);//停止该时间后程序再继续执行
xxxx;
xx;
问题点数:0、回复次数:2Top
1 楼seabell(百合心)回复于 2002-11-14 15:13:52 得分 0
function mystop()
{
//空函数
}
setTimeout(mystop(),10000);
nextfunction();Top
2 楼qiushuiwuhen(秋水无恨)回复于 2002-11-14 15:39:19 得分 0
<script>
function f1(){
alert(1)
setTimeout(function(){
//将后来的代码搁在这里
alert(2)
},1000)
}
f1()
</script>Top



