function ArgTest(a, b){
var s = "";
s += "Expected Arguments: " + ArgTest.length;
s += "<br />";
s += "Passed Arguments: " + arguments.length;
return s;
}
document.write(ArgTest(1, 2));
// Output:
// Expected Arguments: 2
// Passed Arguments: 2
转载于:https://my.oschina.net/u/1458864/blog/282761