为什么我在代码中加入setTimeout("aa(i)");后会提示我
行: 1
错误: 缺少对象
setTimeout("aa(i)"); 位置已经用红色字体标识
<head>
<title>滑动面板</title>
<script type="text/javascript" src="jquery.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function aa(ii){
if(ii=="[object Object]")
{i=1;}else{i=ii;}
$("img").attr("src",i+".jpg");
i++;
setTimeout("aa(i)");
}
);
}
);
</script>
</head>
setTimeout(function(){aa(i);});
setTimeout(aa(i),1000);