Home  >  Q&A  >  body text

找不出问题所在,就是编译不出结果来

<!DOCTYPE  HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函数</title>
<script type="text/javascript">
function aa(x,y)
{
    if(x>y)
    {
       return x; 
    }
    else if(x<y)
    {
        return y;
    }
    else
    {
        return "两个数相等";
    }
}
  document.write(" 5 和 4 的较大值是:"+ aa(5,4)+"<br>");
  document.write(" 6 和 3 的较大值是:"+ aa(6,3) ); 
</script>
</head>
<body>
</body>
</html>
面对疾风吧面对疾风吧2858 days ago827

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:22:50

    Can’t find the problem, just can’t compile the results - PHP Chinese website Q&A - Can’t find the problem, just can’t compile the results - PHP Chinese website Q&A

    Take a look around and learn.

    reply
    0
  • 巴扎黑

    巴扎黑2016-12-21 11:36:08

      return "两个数相等";  你这句用的是中文的分号,改成英文的就行了。

    reply
    0
  • Cancelreply