function fun()

{

for(var i=0; i<arguments.length; i+=2)

$("#"+arguments[i]).val(arguments[i+1]);

}


인자를 몇개를 넘기든 전부 받아서 처리 가능함. 

+ Recent posts