0

代码是这样的。它是一个函数,它接受两个参数“a”和“b”并将它们进行比较并警告输出。但这对我不起作用!

<script type=”text/javascript”&gt;
function compare(a, b) {
if (a < b) {
    alert(“A is less than B”);
} else if (a > b) {
    alert(“A is greater than B”);
} else {
    alert(“A is equal to B”);
}
}

</script>

JsFiddle 链接:http: //jsfiddle.net/tTCG6/2/

有人可以帮我吗?

4

1 回答 1

6
于 2013-05-24T01:56:17.310 回答