码迷,mamicode.com
首页 > 其他好文 > 详细

return返回值

时间:2015-07-29 13:36:51      阅读:119      评论:0      收藏:0      [点我收藏+]

标签:

 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>

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

return返回值

标签:

原文地址:http://www.cnblogs.com/zhangjingyun/p/4685516.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!