为你而来

javascript:函数之arguments对象

function fun(a,b)

{

  arguments.length//传递的参数个数

  fun.length//定义的参数个数,本例为2

  arguments[i]//取得参数的值

  arguments.callee(a,b);

  //即相当于fun(a,b); 

 

}

posted on 2012-03-12 10:51  为你而来  阅读(99)  评论(0编辑  收藏  举报

导航