// declare a variable as a parameter var s = new param; // 定义时叫parameter // issue a function call using the parameter var o = output(dText.innerHTML, s, 'Hello, world.'); // the function is obviously designed to treat the 2nd argument as a parameter... function output(arg1, arg2, arg3) //在方法括号中接收参数的叫 argument { ... // ...so that eventually it can assign a value to it. arg2.setValue(a + b % 10); ... } // when ready to retrieve the output value, use the retrieval function. dResult.innerHTML += s.getValue() + ' (' + o + ')';
代码片段摘自:http://www.codeproject.com/Articles/11232/Passing-function-arguments-as-parameters-in-JavaSc