setTimeout/setInterval 传参

来源:互联网 发布:淘宝上货软件多少钱 编辑:程序博客网 时间:2024/06/06 20:19

一、setTimeout

1.setTimeout(functionName,time,param)

2.setTimeout(function(){ functionName(param) },time)


二、setInterval

同setTimeout,懒得写了。


总结:万能的匿名函数啊