当前位置: 代码迷 >> JavaScript >> javascript 怎样才能确定参数变量的个数呢
  详细解决方案

javascript 怎样才能确定参数变量的个数呢

热度:106   发布时间:2012-10-30 16:13:36.0
javascript 怎样才能确定参数变量的个数呢?
function function_Name(exp1,exp2,exp3,exp4){
Number =function_Name.arguments.length;
if (Number>1)
document.wrile(exp2);
if (Number>2)
document.write(exp3);
if(Number>3)
document.write(exp4);

浏览了很多的页面,就这种方法,

还有其他方法吗,请大家帮帮忙?
  相关解决方案