判断两个数谁大用下面的函数是否可以?
function getMax(num1,num2){
if(num1-num2>0)
alert("num1>num2");
else if(num1-num2==0)
alert("num1=num2");
else
alert("num1<num2");
}
getMax(5,8);
function getMax(num1,num2){
if(num1-num2>0)
alert("num1>num2");
else if(num1-num2==0)
alert("num1=num2");
else
alert("num1<num2");
}
getMax(5,8);
2017-04-24
举报