怎样把两个结果都输出了?
怎样把两个结果都输出了?
2015-04-02
改成如下代码就可以了
<!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) { add = x + y +z; document.write(x+"、"+y+"、"+z+"和:"+add+"<br/>"); } sum(5,8,3); sum(7,1,4); </script> </head> <body> </body> </html>
举报