2021-01-20 10:20发布
定时器setTimeOut()与clearTimeOut()javascript
setTimeOut()使用方法:< …… onClick="timerID=setTimeout('display ()',5000)">java
1.设置定时器的名称为timeID以便之后终止定时器时用到clearTimeOut(timeID)。spa
2.display()方法要使用单引号。事件
3.点击事件发生5000毫秒以后执行display()方法一次。ip
定时器setInterval()与clearInterval()定时器
setInterval()使用方法:<……onClick="timerID=setInterval ('display ()',5000)">方法
1.设置定时器的名称为timeID以便之后终止定时器时用到clearInterval(timeID)。im
2.display()方法要使用单引号。di
3.点击事件发生5000毫秒以后重复的执行display()方法。直到关闭窗口或者调用clearInterval()c
最多设置5个标签!
定时器setTimeOut()与clearTimeOut()javascript
setTimeOut()使用方法:< …… onClick="timerID=setTimeout('display ()',5000)">java
1.设置定时器的名称为timeID以便之后终止定时器时用到clearTimeOut(timeID)。spa
2.display()方法要使用单引号。事件
3.点击事件发生5000毫秒以后执行display()方法一次。ip
定时器setInterval()与clearInterval()定时器
setInterval()使用方法:<……onClick="timerID=setInterval ('display ()',5000)">方法
1.设置定时器的名称为timeID以便之后终止定时器时用到clearInterval(timeID)。im
2.display()方法要使用单引号。di
3.点击事件发生5000毫秒以后重复的执行display()方法。直到关闭窗口或者调用clearInterval()c
一周热门 更多>