Javascript中的arguments 对象
function fn(a,b,c)
{
var s = "";
var i;
s += "函数传入参数个数:" + fn.arguments.length + "\n";
for (i=0;i<fn.arguments.length;i++)
{
s += "函数传入参数" + i +":" + fn.arguments[i] + "\n";
}
s += "函数实际参数个数:" + fn.arguments.callee.length + "\n";
document.all.t.innerText = s
}
{
var s = "";
var i;
s += "函数传入参数个数:" + fn.arguments.length + "\n";
for (i=0;i<fn.arguments.length;i++)
{
s += "函数传入参数" + i +":" + fn.arguments[i] + "\n";
}
s += "函数实际参数个数:" + fn.arguments.callee.length + "\n";
document.all.t.innerText = s
}
posted on 2004-10-25 14:01 Goodspeed 阅读(2877) 评论(0) 编辑 收藏 举报