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

阶梯相乘

时间:2017-07-11 09:37:04      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:alert   document   return   type   text   while   script   func   charset   

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <script type="text/javascript">
         window.onload=function(){
            function a(b){
                var num=1;
                while(b>1){
                    num*=b;
                    b--;
                }
                return num;
            }
            alert(a(4));
         };
    </script>
</head>
<body>
    
</body>
</html>

阶梯相乘

标签:alert   document   return   type   text   while   script   func   charset   

原文地址:http://www.cnblogs.com/saoniansaonian/p/7148790.html

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