为什么定义函数名为sum时就只能输出一组而已??
看透不说透
看透不说透 2016-12-20 13:26:38
0
2
1037
看透不说透
看透不说透

reply all(2)
数据分析师

Why can only one group be output when the function is named sum? ? -PHP Chinese website Q&A-Why can only one group be output when the function name is defined as sum? ? -PHP Chinese website Q&A

Please watch and learn.

迷茫
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函数传参</title>
<script type="text/JavaScript">
   function sum(x,y,z)                
 {
   sum1 = x + y +z;
   document.write(x+"、"+y+"、"+z+"和:"+sum1+"<br/>");
 }
  sum(5,8,3);
     sum(7,1,4);
   
</script>
</head>
<body>
</body>
</html>

方法名不能和定义和的值一样,不然只能执行一次。

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template