<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>调用递归函数</title>
</head>
<script type="text/javascript">
function f(num){
if(num<=1){
return 1
}else{
return f(num-1)*num;
}
}
</script>
<body>
<script type="text/javascript">
alert("10!的结果为"+f(10));
</script>
</body>
</html>
这个是递归函数的调用方法,可以植入到java中