window.onload = function(){ function dada(name){ alert(arguments.length);//获取实际被传递参数的数值。实参 //3 alert(dada.length);// // 获取期望参数的数值,函数定义时的预期参数个数,形参 //1 alert("i‘m " + name + arguments[1] + " years old." + "i‘m in " + arguments[2] );//name等于arguments[0] im jiangsen 23 years old im in chengdu } dada("jiangsen",23,"chengdu") }
时间: 2024-10-11 19:07:51