有两个方法第一个
function CommFunction(sum){
for(var i = 1 ; i <= sum;i++){
var id = "func" + i;
alert("CommFunction方法的Id:" + id);
movefunction(id);
}
}
第二个function movefunction(id){
if(document.getElementById(id).filters.alpha.opacity < 80){
document.getElementById(id).filters.alpha.opacity += 10;
alert("opacity:" +document.getElementById(id).filters.alpha.opacity +"Id:"+ id);
setTimeout("movefunction(id)",50);
}
}弹出的消息框是CommFunction方法的Id :func1 opacity: 30 Id:func1
CommFunction方法的Id :func2 opacity: 30 Id:func2
CommFunction方法的Id :func3 opacity: 30 Id:func3
CommFunction方法的Id :func4 opacity: 30 Id:func4貌似没有执行 setTimeout 这个方法
function CommFunction(sum){
for(var i = 1 ; i <= sum;i++){
var id = "func" + i;
alert("CommFunction方法的Id:" + id);
movefunction(id);
}
}
第二个function movefunction(id){
if(document.getElementById(id).filters.alpha.opacity < 80){
document.getElementById(id).filters.alpha.opacity += 10;
alert("opacity:" +document.getElementById(id).filters.alpha.opacity +"Id:"+ id);
setTimeout("movefunction(id)",50);
}
}弹出的消息框是CommFunction方法的Id :func1 opacity: 30 Id:func1
CommFunction方法的Id :func2 opacity: 30 Id:func2
CommFunction方法的Id :func3 opacity: 30 Id:func3
CommFunction方法的Id :func4 opacity: 30 Id:func4貌似没有执行 setTimeout 这个方法
解决方案 »
- 关于checkboxlist的奇怪问题
- .NET2005,表格、数据,问题!急急急!30分
- ASP只能打开首页,后台也能使用,其它任何链接都打不开。
- Asp.net如何在Web页面上直接打开、编辑、创建Office文档的问题?
- 急啊!IEWebControls组件失效了,怎么办???
- 如何在服务器配置加密为.dll的asp网页?
- 脚本sys.ArgumentUndefinedException:value cannot be undefined parameter name:type是什么意思啊
- 请教一下TreeView里有特殊字符不显示的问题
- 母版页
- 关于不安全字符 求助 高分
- 关于google calendar
- 【分享】刚才发现了一个好东西,ms出了款免费的chart控件
你不传id这个函数怎么会执行了??
http://blog.csdn.net/xiage/archive/2009/06/08/4252126.aspx
//setTimeout("movefunction(id)",50);
这个写错了
"movefunction(id)" //需要一个参数,
setTimeout("movefunction(“+id+”)",50);
setTimeout("movefunction('"+id+"')",1000);
//50太小..1000就是1秒了 还有..必须是'"++"'这种..
参数传第的错误,上边的写法正确