 
		羽.
2016-03-04 09:04
function big(x,y){
    if(x>y){
        return x;
    }else if(x<y){
        return y;
    }else{
        return ("x=y");
    }
    }
 
				function big(x,y){
    if(x>y){
        document.write(x);
    }else if(x<y){
        document.write(y);
    }else{
        document.write(x=y);
    }
}
big(4,6);可以输出大的啊,是哪里有问题呢
 
				那是因为你最好没有调用函数吧
 
				write不能对值进行处理
 
				function big(x,y){
    if(x>y){
        document.write(x);
    }else if(x<y){
        document.write(y);
    }else{
        document.write(x=y);
    }
}
big(4,6);
document.write('这两个数中较大的是:'+big(4,6));你把这个输出一下再结合我发的文字肯定就能明白了
 
				因为要对函数的输出结果进行处理
JavaScript进阶篇
469065 学习 · 22582 问题
相似问题