function a2(pram){ alert(" it is in a2 param1="+pram); setTimeout(function(){a2('sss1')},3000); //为什么setTimeout后面的第一个参数不能加双引号? setTimeout("a2('sss2')",5000); //为什么setTimeout后面的第一个参数必须加双引号? } </script> </BODY> </HTML>
<script>
function a1(pram){
alert(" it is in a2 param1="+pram);
setTimeout("a3()",5000);
}
function a3(){
//.....
}
</script>
//如果你要传string参数可以这样:
setTimeout("a2("+ param +")",5000);