为了账号安全,请及时绑定邮箱和手机立即绑定
<!DOCTYPE  HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函数</title>

<script type="text/javascript">

function add1(x,y)//定义函数

if (x>y)
{
    
   return x;
    };
    else if(x<y)
    {
    return y    
    }


//函数体,判断两个整数比较的三种情况


add1(5,4);
add1(6,3);

 
//调用函数,实现下面两组数中,返回就大值。
  document.write(" 5 和 4 的较大值是:"sum"<br/>");
  document.write(" 6 和 3 的较大值是:"sum"<br/>"); 




</script>
</head>
<body>
</body>
</html>


正在回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信