- 每一个函数对象都有一个length属性,表示该函数期望接收的参数个数。
<html> <head> <script type="text/javascript"> var add =function(num1,num2,num3){ alert(num1+num2+num3); } alert(add.length); </script> </head> <body> </body> </html>
时间: 2024-10-13 00:55:13
<html> <head> <script type="text/javascript"> var add =function(num1,num2,num3){ alert(num1+num2+num3); } alert(add.length); </script> </head> <body> </body> </html>