JS函数05
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <script type="text/javascript"> //回调函数的例子 function calc(x,y){ return x()+y(); } function test1(){ return 3; } function test2(){ return 5; } //alert(calc(test1,test2)); //alert(calc(function(){return 5;},function(){return 10;})); function say (value) { alert(value); } //alert(say); say('hi js.'); </script> </body> </html>