function a(type){
alert(type);
}
setTimeout(a,3000)
这里的 a 是函数,我怎么给a 传递参数
function a(type){
alert(type);
}
setTimeout("a("+'123'+")",3000) //把参数和函数变成字符串
function a(type){
alert(type);
}
setTimeout(function(){
a('123')
},3000) //多套一层函数,在函数里面赋值,调用函数