<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>函数的返回值</title> </head> <body> <script type="text/javascript"> //定义函数: function demo(){ alert("itcast"); return "你好"; } var v = demo(); alert(v); //定义函数 function func(){ //在这里有个内置的数组arguments for(var i=0;i<arguments.length;i++){ document.write(arguments[i]+" ") } document.write("<hr/>"); } func(); func(1,2); func("a",1,4,true,false); </script> </body> </html>