求大佬幫我看看哪里錯了
<!DOCTYPE? HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函數(shù)</title>
<script type="text/javascript">
function cond(x,y){
? ?
? ? if(x>y)
? ? {
? ? ? ? return x;
? ? }
? ? else if(x<y)
? ? {
? ? ? ? return y;
? ? }else
? ? {return "兩數(shù)相等"}
}
?document.write("5和6的較大值:"+cond(5,6)+"<br/>");
?document.write("6和4的較大值:"+cond(6,4)+"<br/>");
?document.write("55和55的較大值:"cond(55,55));
</script>
</head>
<body>
</body>
</html>
2019-10-20
兩數(shù)相等后面沒有";"分號,"55和55的較大值:"+cond(55,55),我也初學,就看到這,你改的試試?
2019-11-25
?document.write("55和55的較大值:"+cond(55,55));
不過建議 var sum1= cond(55,55);
2019-11-01
"55和55的較大值:"后面少了個加號吧?