return返回值

 1 <!DOCTYPE HTML>
 2 <html>
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 5 <title>无标题文档</title>
 6 </head>
 7 
 8 <body>
 9     <script>
10         function a(){
11             return 1;
12         }
13         
14         alert(a());
15     </script>
16 </body>
17 </html>

函数先定义,再调用,调用之后要给返回值

posted on 2015-07-29 11:44  zhangjingyun  阅读(136)  评论(0编辑  收藏  举报