js不支持重载。 //aaa.html <html> <head> <title>aaa</title> </head> <body> <script type="text/javascript"> function test(a,b){ alert(a+b); } function test(a,b,c){ alert(a+b+c); } function test(a,b,c,d){ alert(a+b+c+d); } test(1,2); //NaN test(1,2,3); //NaN test(1,2,3,4); //10 </script> </body> </html>